[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

groupmember() bug?



I just noticed something that popped up on comp.protocols.nfs, which seems
like it might be a bug in several BSD flavours?

groupmember() - only checks cr_groups[] and not cr_gid


In 4.4, cr_gid was just cr_groups[0], but some subsequent flavours have
separated it out from cr_groups[] in "struct ucred".

As a result, ufs_chown() fails to change the gid of a file to the primary
gid (cr_gid) of a user, unless that gid is also listed in cr_groups[].
(This showed up as an NFS setattr problem for setting a gid of a newly
 created file to the client user's primary effective gid.)

Is this a bug? rick



Visit your host, monkey.org