diff options
author | Günther Deschner <gd@samba.org> | 2009-06-08 13:04:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-06-08 13:06:25 +0200 |
commit | bc091e7847d2ad0b72511194ab244c5f9332d641 (patch) | |
tree | 9f05ce101b6b9916e8b69a932ff46f3206dbf3f0 /source3/winbindd | |
parent | 9ac7e78041c21f988851676d4b569a577d33cb08 (diff) | |
download | samba-bc091e7847d2ad0b72511194ab244c5f9332d641.tar.gz samba-bc091e7847d2ad0b72511194ab244c5f9332d641.tar.bz2 samba-bc091e7847d2ad0b72511194ab244c5f9332d641.zip |
s3-winbindd: workaround alias enumeration in expand_groups().
alias enumeration in NSS is not done properly done atm and needs to be fixed.
Guenther
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_group.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c index 913f63112f..e31a55b0cf 100644 --- a/source3/winbindd/winbindd_group.c +++ b/source3/winbindd/winbindd_group.c @@ -463,18 +463,31 @@ static NTSTATUS expand_groups( TALLOC_CTX *ctx, DEBUG(10,("expand_groups:\n")); for ( i=0; i<n_glist; i++ ) { + + NTSTATUS lookup_status; + tmp_ctx = talloc_new( ctx ); /* Lookup the group membership */ - status = d->methods->lookup_groupmem(d, tmp_ctx, + lookup_status = d->methods->lookup_groupmem(d, tmp_ctx, &glist[i], &num_names, &sid_mem, &names, &name_types); - if (!NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(lookup_status)) { DEBUG(10,("expand_groups: lookup_groupmem for " "sid %s failed with: %s\n", - sid_string_dbg(&glist[i]), nt_errstr(status))); + sid_string_dbg(&glist[i]), + nt_errstr(lookup_status))); + + /* we might have hit a logic error when called for an + * alias, in that case just continue with group + * expansion - Guenther */ + + if (NT_STATUS_EQUAL(lookup_status, NT_STATUS_NO_SUCH_GROUP)) { + continue; + } + status = lookup_status; goto out; } |