From bc091e7847d2ad0b72511194ab244c5f9332d641 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 8 Jun 2009 13:04:47 +0200 Subject: s3-winbindd: workaround alias enumeration in expand_groups(). alias enumeration in NSS is not done properly done atm and needs to be fixed. Guenther --- source3/winbindd/winbindd_group.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source3/winbindd') 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; imethods->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; } -- cgit