summaryrefslogtreecommitdiff
path: root/source4/auth/sam.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-14 23:50:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:08 -0500
commit1fde679daec85e2d9c24a05566a8bae18a6ee0fb (patch)
tree94e530b358a362c7797be93ee0de0efd1ce39b1b /source4/auth/sam.c
parentda9a31b22885603ea227a6c28db49f89f14fdda8 (diff)
downloadsamba-1fde679daec85e2d9c24a05566a8bae18a6ee0fb.tar.gz
samba-1fde679daec85e2d9c24a05566a8bae18a6ee0fb.tar.bz2
samba-1fde679daec85e2d9c24a05566a8bae18a6ee0fb.zip
r16238: Use a baseDN for the auth_sam searches, to allow continued function
with partitions. Also fix some debug messages. Andrew Bartlett (This used to be commit a2441ae99a6c3b4bf40f5369477a9bc0f3019c34)
Diffstat (limited to 'source4/auth/sam.c')
-rw-r--r--source4/auth/sam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index 0e9fa5c02e..e7f70aa370 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, NULL, &group_msgs, group_attrs,
+ tmp_ctx, samdb_base_dn(tmp_ctx), &group_msgs, group_attrs,
"(&(member=%s)(sAMAccountType=*))",
ldb_dn_linearize(tmp_ctx, msg->dn));
if (group_ret == -1) {
@@ -321,6 +321,7 @@ _PUBLIC_ NTSTATUS sam_get_results_principal(struct ldb_context *sam_ctx,
NTSTATUS nt_status;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
int ret;
+ const struct ldb_dn *partitions_basedn = ldb_dn_string_compose(mem_ctx, samdb_base_dn(mem_ctx), "CN=Partitions,CN=Configuration");
if (!tmp_ctx) {
return NT_STATUS_NO_MEMORY;
@@ -333,7 +334,7 @@ _PUBLIC_ NTSTATUS sam_get_results_principal(struct ldb_context *sam_ctx,
}
/* grab domain info from the reference */
- ret = gendb_search(sam_ctx, tmp_ctx, NULL, msgs_domain_ref, domain_ref_attrs,
+ ret = gendb_search(sam_ctx, tmp_ctx, partitions_basedn, msgs_domain_ref, domain_ref_attrs,
"(ncName=%s)", ldb_dn_linearize(tmp_ctx, domain_dn));
if (ret != 1) {