getgroups and getgrouplist functions

Vulpes Velox v.velox at vvelox.net
Mon Jan 1 21:50:59 PST 2007


Just working on fixing the problem with DBus for when a user is a
member of more than 16 groups. I have NGROUPS_MAX set to 64 on this
system.

So far I have one person on the DBus mailing list telling me that the
FreeBSD getgrouplist is broken. I just want to verify if how I am
reading the docs is correctly.

I am reading it as int *ngroups is not set to the number of groups in
the list if the number of groups is larger than the number specified.
They are saying it does not make a difference because getgroupslist
will do it regardless. Based on testing and reading the man, I am
convinced this is a load of bull. And the proper way to get the
number of groups some one is in is to call getgroups(0).

Any one have any opinions or would like to hear more?


More information about the freebsd-hackers mailing list