summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-07-06 07:40:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:49 -0500
commit51e0ae33acf3cd09ae0eb9ef5077cecab4780a3e (patch)
treef9c8546d8506c9910be019df68684cfed5690f45 /source4/dsdb/common
parent1f1b34b3e815b0a6f502c7ae6e98887e280e7040 (diff)
downloadsamba-51e0ae33acf3cd09ae0eb9ef5077cecab4780a3e.tar.gz
samba-51e0ae33acf3cd09ae0eb9ef5077cecab4780a3e.tar.bz2
samba-51e0ae33acf3cd09ae0eb9ef5077cecab4780a3e.zip
r16833: Add a base DN to more search calls, we need to look for an ID over the
whole tree here. Andrew Bartlett (This used to be commit 7674306e673341513d26556a845a698a28dec92b)
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/sidmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/dsdb/common/sidmap.c b/source4/dsdb/common/sidmap.c
index 3590c57b84..38c4ba49a9 100644
--- a/source4/dsdb/common/sidmap.c
+++ b/source4/dsdb/common/sidmap.c
@@ -137,7 +137,7 @@ _PUBLIC_ NTSTATUS sidmap_sid_to_unixuid(struct sidmap_context *sidmap,
tmp_ctx = talloc_new(sidmap);
- ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs,
+ ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs,
"objectSid=%s", ldap_encode_ndr_dom_sid(tmp_ctx, sid));
if (ret != 1) {
goto allocated_sid;
@@ -233,7 +233,7 @@ _PUBLIC_ NTSTATUS sidmap_sid_to_unixgid(struct sidmap_context *sidmap,
tmp_ctx = talloc_new(sidmap);
- ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs,
+ ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs,
"objectSid=%s", ldap_encode_ndr_dom_sid(tmp_ctx, sid));
if (ret != 1) {
goto allocated_sid;
@@ -347,7 +347,7 @@ _PUBLIC_ NTSTATUS sidmap_uid_to_sid(struct sidmap_context *sidmap,
given uid
*/
- ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs,
+ ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs,
"unixID=%u", (unsigned int)uid);
for (i=0;i<ret;i++) {
if (!is_user_account(res[i])) continue;
@@ -445,7 +445,7 @@ _PUBLIC_ NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
given gid
*/
- ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs,
+ ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs,
"unixID=%u", (unsigned int)gid);
for (i=0;i<ret;i++) {
if (!is_group_account(res[i])) continue;
@@ -465,7 +465,7 @@ _PUBLIC_ NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
goto allocate_sid;
}
- ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs,
+ ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs,
"(|(unixName=%s)(sAMAccountName=%s))",
grp->gr_name, grp->gr_name);
for (i=0;i<ret;i++) {