summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-10-09 01:44:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:55 -0500
commit4792a8de3057dc9a6e6be43f618407ddb036484e (patch)
tree37459f627eea15c1cff1cf4e97f0a20636931221 /source3/nsswitch/winbindd_group.c
parent3d502114809854a49fab0ff6c14cb6a51a07ab85 (diff)
downloadsamba-4792a8de3057dc9a6e6be43f618407ddb036484e.tar.gz
samba-4792a8de3057dc9a6e6be43f618407ddb036484e.tar.bz2
samba-4792a8de3057dc9a6e6be43f618407ddb036484e.zip
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 (This used to be commit dc19f161698dab5b71d61fa2bacc7e7b8da5fbba)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index a3b826278b..8ab5150bbe 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -919,24 +919,6 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
return WINBINDD_OK;
}
-static void add_gid_to_array_unique(gid_t gid, gid_t **gids, int *num)
-{
- int i;
-
- for (i=0; i<*num; i++) {
- if ((*gids)[i] == gid)
- return;
- }
-
- *gids = Realloc(*gids, (*num+1) * sizeof(gid_t));
-
- if (*gids == NULL)
- return;
-
- (*gids)[*num] = gid;
- *num += 1;
-}
-
static void add_local_gids_from_sid(DOM_SID *sid, gid_t **gids, int *num)
{
gid_t gid;