diff options
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/auth_sam.c | 4 | ||||
-rw-r--r-- | source4/auth/sam.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c index 7ce2cabbf9..ee9a308ed8 100644 --- a/source4/auth/auth_sam.c +++ b/source4/auth/auth_sam.c @@ -75,8 +75,6 @@ static NTSTATUS authsam_search_account(TALLOC_CTX *mem_ctx, struct ldb_context * } domain_dn = samdb_result_dn(mem_ctx, msgs_domain_ref[0], "nCName", NULL); - } else { - domain_dn = samdb_base_dn(mem_ctx); } /* pull the user attributes */ @@ -107,7 +105,7 @@ static NTSTATUS authsam_search_account(TALLOC_CTX *mem_ctx, struct ldb_context * } /* find the domain's DN */ - ret = gendb_search(sam_ctx, mem_ctx, samdb_base_dn(mem_ctx), &msgs_tmp, NULL, + ret = gendb_search(sam_ctx, mem_ctx, NULL, &msgs_tmp, NULL, "(&(objectSid=%s)(objectclass=domain))", ldap_encode_ndr_dom_sid(mem_ctx, domain_sid)); if (ret == -1) { diff --git a/source4/auth/sam.c b/source4/auth/sam.c index e7f70aa370..f616138a3e 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -206,7 +206,7 @@ _PUBLIC_ NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx, struct ldb_conte TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); group_ret = gendb_search(sam_ctx, - tmp_ctx, samdb_base_dn(tmp_ctx), &group_msgs, group_attrs, + tmp_ctx, NULL, &group_msgs, group_attrs, "(&(member=%s)(sAMAccountType=*))", ldb_dn_linearize(tmp_ctx, msg->dn)); if (group_ret == -1) { |