Author: abartlet Date: 2006-07-06 07:40:26 +0000 (Thu, 06 Jul 2006) New Revision: 16833
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16833 Log: Add a base DN to more search calls, we need to look for an ID over the whole tree here. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/common/sidmap.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/common/sidmap.c =================================================================== --- branches/SAMBA_4_0/source/dsdb/common/sidmap.c 2006-07-06 07:37:41 UTC (rev 16832) +++ branches/SAMBA_4_0/source/dsdb/common/sidmap.c 2006-07-06 07:40:26 UTC (rev 16833) @@ -137,7 +137,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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++) {