Hi,

I have been trying to get set up nscd and enabling the group cache seems to 
break a lot of things.

When logging in over ssh my effective groups did not include the wheel group 
and logging in with login(1) my effctive gid was set to the wheel group instead 
of my users pw_gid. Looking at my ids the pw_gid was the last one instead of 
the first one.
The issue is that the position of the primary gid returned from getgrouplist is 
different between a lookup over nscd and a direct lookup. Without nscd it is 
the first entry in the array and with nscd the last one.

A lot of code in Hurd assumes that the order matches the hurd assumptions that 
the first one is the posix effective gid and the order being different messes 
up everything.

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 but to me it seems like Hurd has been (implicitly?) 
relying on this order which does not seem to be guaranteed by libc.

Thanks,
Y.

Reply via email to