summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-25 07:08:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:45 -0500
commit0fd98079425cff37c45be824ffa2695458ff12f3 (patch)
tree6e56cb6f01fcb4242918451a67f63aabeca76693 /source4/dsdb/common
parentfb36e279e79ae54c1622c316780e20fb9aaf1a85 (diff)
downloadsamba-0fd98079425cff37c45be824ffa2695458ff12f3.tar.gz
samba-0fd98079425cff37c45be824ffa2695458ff12f3.tar.bz2
samba-0fd98079425cff37c45be824ffa2695458ff12f3.zip
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)
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/sidmap.c13
1 files changed, 6 insertions, 7 deletions
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;i<ret;i++) {
if (!is_user_account(res[i])) continue;
@@ -445,7 +444,7 @@ _PUBLIC_ NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
given gid
*/
- ret = gendb_search(sidmap->samctx, 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;i<ret;i++) {
if (!is_group_account(res[i])) continue;
@@ -465,7 +464,7 @@ _PUBLIC_ NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
goto allocate_sid;
}
- ret = gendb_search(sidmap->samctx, 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<ret;i++) {