diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-11-05 23:34:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:09 -0500 |
commit | 154d5f913b4ce60f731227eb1bb3650c45fcde93 (patch) | |
tree | 6dcd8538e9cc97c4d891082280055d8fe3c8366a /source3/nsswitch | |
parent | 55fe875a44bd63de766d4fbdb91bcc26be146a21 (diff) | |
download | samba-154d5f913b4ce60f731227eb1bb3650c45fcde93.tar.gz samba-154d5f913b4ce60f731227eb1bb3650c45fcde93.tar.bz2 samba-154d5f913b4ce60f731227eb1bb3650c45fcde93.zip |
r3566: Completely replace the queryuseraliases call. The previous implementation does
not exactly match what you would expect.
XP workstations during login actually do this, so we should better become a
bit more correct. The LDAP query issued is not really fully optimal, but it is
a lot faster and more correct than what was there before. The change in
passdb.h makes it possible that queryuseraliases is done with a single ldap
query.
Volker
(This used to be commit 2508d4ed1e16c268fc9f3676b0c6a122e070f93d)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 8ab5150bbe..eec0f72217 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -936,7 +936,7 @@ static void add_local_gids_from_sid(DOM_SID *sid, gid_t **gids, int *num) /* Add nested group memberships */ - if (!pdb_enum_alias_memberships(sid, &aliases, &num_aliases)) + if (!pdb_enum_alias_memberships(sid, 1, &aliases, &num_aliases)) return; for (j=0; j<num_aliases; j++) { @@ -1146,7 +1146,7 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) return result; } -static void add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid, +static void add_sid_to_parray_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid, DOM_SID ***sids, int *num_sids) { int i; @@ -1174,15 +1174,15 @@ static void add_local_sids_from_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, DOM_SID *aliases = NULL; int i, num_aliases = 0; - if (!pdb_enum_alias_memberships(sid, &aliases, &num_aliases)) + if (!pdb_enum_alias_memberships(sid, 1, &aliases, &num_aliases)) return; if (num_aliases == 0) return; for (i=0; i<num_aliases; i++) - add_sid_to_array_unique(mem_ctx, &aliases[i], user_grpsids, - num_groups); + add_sid_to_parray_unique(mem_ctx, &aliases[i], user_grpsids, + num_groups); SAFE_FREE(aliases); |