Hi Samuel Sep 10, 2026, 16:45 by [email protected]:
>> Is this a bug in Hurd or in glibc/nscd? >> Changing the nscd lookup to insert the group name at the beginning instead >> of the end would fix it >> > > Perhaps we just need to fix glibc's setgroups to make sure that the > current effective gid is first in the list given to the auth server, > fixing the order if needed. > > Samuel > Fixing setgroups is not enough because i.e. _merge_implied_gids also assumes that the pw_gid is first for setgrouplist and does not use setgroups. (though that could be adapted as well) Wouldnt it be netter to ensure this inĀ __nscd_getgrouplist to prepend the group instead of appending it and make the normal and nscd output identical? There is a potential issue when the extra gid is already there because then it would contain duplicates and it needs to rewrite the list.The normal path immedaitely sets the first value and cleans up duplicates at the end and I am not sure why the nscd path does not do something similar. That particular part of glibc has been unchanged since 2004 so this must have never worked?Y.
