summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-06-28 10:45:04 -0500
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-28 19:33:44 +0200
commitfa9557fee3ca546878d99b77f1ff37f724c37024 (patch)
treee316a460f72970263d5d0ac9e5ee940f0decba2c /source4
parentba0ba4e85b6c248cfc8079d6db9b8a22e55f7336 (diff)
downloadsamba-fa9557fee3ca546878d99b77f1ff37f724c37024.tar.gz
samba-fa9557fee3ca546878d99b77f1ff37f724c37024.tar.bz2
samba-fa9557fee3ca546878d99b77f1ff37f724c37024.zip
s4/auth: Fixed authsam_expand_nested_groups() to find entry SID if not available in the DN.
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/sam.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index 894ba37fd5..b0fc9ca6ca 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -319,9 +319,16 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx,
talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
+
status = dsdb_get_extended_dn_sid(dn, &sid, "SID");
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, (__location__ "when parsing DN %s we failed to find or parse SID component, so we cannot calculate the group token: %s",
+ ret = dsdb_search(sam_ctx, tmp_ctx, &res, dn, LDB_SCOPE_BASE, attrs, DSDB_SEARCH_SHOW_EXTENDED_DN, NULL);
+ dn = res->msgs[0]->dn;
+ status = dsdb_get_extended_dn_sid(dn, &sid, "SID");
+ }
+
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, (__location__ ": when parsing DN %s we failed to find or parse SID component, so we cannot calculate the group token: %s\n",
ldb_dn_get_extended_linearized(tmp_ctx, dn, 1),
nt_errstr(status)));
talloc_free(tmp_ctx);