summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samba3sid.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-01-17 13:12:15 +1100
committerAndrew Tridgell <tridge@samba.org>2011-01-17 05:23:04 +0100
commit87f31510475c6debd56ff874130f4f5d48bef9a5 (patch)
tree07c44c78c297b9dbecbf5467736f08383f5cfdfd /source4/dsdb/samdb/ldb_modules/samba3sid.c
parent633c3e8da5a3a5ee1b61f9045c7dedb39bbb668a (diff)
downloadsamba-87f31510475c6debd56ff874130f4f5d48bef9a5.tar.gz
samba-87f31510475c6debd56ff874130f4f5d48bef9a5.tar.bz2
samba-87f31510475c6debd56ff874130f4f5d48bef9a5.zip
s4-dsdb: pass parent request to dsdb_module_*() functions
this preserves the request hierarchy for dsdb_module_*() calls inside dsdb ldb modules Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samba3sid.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sid.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sid.c b/source4/dsdb/samdb/ldb_modules/samba3sid.c
index 76bcfce713..f38ab407bb 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sid.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sid.c
@@ -37,7 +37,8 @@
(loosely based on Volkers code)
*/
static int samba3sid_next_sid(struct ldb_module *module,
- TALLOC_CTX *mem_ctx, char **sid)
+ TALLOC_CTX *mem_ctx, char **sid,
+ struct ldb_request *parent)
{
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
struct ldb_result *res;
@@ -53,6 +54,7 @@ static int samba3sid_next_sid(struct ldb_module *module,
attrs,
DSDB_FLAG_NEXT_MODULE |
DSDB_SEARCH_SEARCH_ALL_PARTITIONS,
+ parent,
"(&(objectClass=sambaDomain)(sambaDomainName=%s))",
lpcfg_sam_name(ldb_get_opaque(ldb, "loadparm")));
if (ret != LDB_SUCCESS) {
@@ -119,7 +121,7 @@ static int samba3sid_next_sid(struct ldb_module *module,
ret = dsdb_module_constrainted_update_uint32(module, msg->dn,
"sambaNextRid",
- &sambaNextRid, &rid);
+ &sambaNextRid, &rid, parent);
if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(ldb,
__location__
@@ -169,7 +171,7 @@ static int samba3sid_add(struct ldb_module *module, struct ldb_request *req)
return ldb_module_oom(module);
}
- ret = samba3sid_next_sid(module, new_msg, &sid);
+ ret = samba3sid_next_sid(module, new_msg, &sid, req);
if (ret != LDB_SUCCESS) {
return ret;
}