From 0fd98079425cff37c45be824ffa2695458ff12f3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 25 Aug 2006 07:08:06 +0000 Subject: r17823: get rid of most of the samdb_base_dn() calls, as they are no longer needed in searches (This used to be commit a5ea749f0ac63bf495a55ee8d9d002208ab93572) --- source4/dsdb/common/sidmap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source4/dsdb/common/sidmap.c') diff --git a/source4/dsdb/common/sidmap.c b/source4/dsdb/common/sidmap.c index 353d5c14f1..dde01fba72 100644 --- a/source4/dsdb/common/sidmap.c +++ b/source4/dsdb/common/sidmap.c @@ -103,8 +103,7 @@ static NTSTATUS sidmap_primary_domain_sid(struct sidmap_context *sidmap, int ret; struct ldb_message **res = NULL; - ret = gendb_search_dn(sidmap->samctx, mem_ctx, samdb_base_dn(mem_ctx), - &res, attrs); + ret = gendb_search_dn(sidmap->samctx, mem_ctx, NULL, &res, attrs); if (ret != 1) { talloc_free(res); return NT_STATUS_NO_SUCH_DOMAIN; @@ -137,7 +136,7 @@ _PUBLIC_ NTSTATUS sidmap_sid_to_unixuid(struct sidmap_context *sidmap, tmp_ctx = talloc_new(sidmap); - ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs, + ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs, "objectSid=%s", ldap_encode_ndr_dom_sid(tmp_ctx, sid)); if (ret != 1) { goto allocated_sid; @@ -233,7 +232,7 @@ _PUBLIC_ NTSTATUS sidmap_sid_to_unixgid(struct sidmap_context *sidmap, tmp_ctx = talloc_new(sidmap); - ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs, + ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs, "objectSid=%s", ldap_encode_ndr_dom_sid(tmp_ctx, sid)); if (ret != 1) { goto allocated_sid; @@ -347,7 +346,7 @@ _PUBLIC_ NTSTATUS sidmap_uid_to_sid(struct sidmap_context *sidmap, given uid */ - ret = gendb_search(sidmap->samctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs, + ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs, "uidNumber=%u", (unsigned int)uid); for (i=0;isamctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs, + ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs, "gidNumber=%u", (unsigned int)gid); for (i=0;isamctx, tmp_ctx, samdb_base_dn(tmp_ctx), &res, attrs, + ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs, "(|(unixName=%s)(sAMAccountName=%s))", grp->gr_name, grp->gr_name); for (i=0;i