setgroups problems on FreeBSD - proposed fix

James Peach jpeach at samba.org
Wed May 23 18:19:55 GMT 2007


On May 23, 2007, at 10:50 AM, Volker Lendecke wrote:

> On Wed, May 23, 2007 at 09:31:34AM -0700, James Peach wrote:
>> The first element in the groups list is always the effective gid on
>> (most?all?) BSD systems. But you get this back from getgroups, so as
>> long as you only give setgroups what you got back from getgroups, you
>> don't need anything special.
>
> Well, we did not do a getgroups before doing setgroups...

So where did the groups list come from? If it came from getgrouplist,  
then group[0] is probably not the primary gid.

--
James Peach | jpeach at samba.org



More information about the samba-technical mailing list