r2868: Well, I'm not quite sure what I'm doing back in Samba 3.0, but anyway...
commitdc19f161698dab5b71d61fa2bacc7e7b8da5fbba
authorAndrew Bartlett <abartlet@samba.org>
Sat, 9 Oct 2004 01:44:05 +0000 (9 01:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:55 +0000 (10 10:52 -0500)
tree6309d4c9ffd5fac89729716543c8ce2024470182
parentf16ed2616a67c412bc9b78354a5faf673e64cf42
r2868: Well, I'm not quite sure what I'm doing back in Samba 3.0, but anyway...

I've been grumbling about under-efficient calls in SAMR, and finally
got around to fixing some of them.

We now call sys_getgroups() (which in turn calls initgroups(), until
glibc 3.4 is released) to figure out a user's group membership.  This
is far, far more efficient than scanning all the groups looking for a
match, and is still the 'posix way', just using an effiecient call.

The seperate issue of 'who is in this group' remains, but this one has
been biting some people.

I need to talk to VL about how best to exersise nasty corner cases,
but my initial tests hold strong.  (The code is also much simpiler
than before, which has to count for something :-)

Andrew Bartlett
source/lib/util.c
source/lib/util_smbd.c
source/nsswitch/winbindd_group.c
source/rpc_server/srv_util.c