summaryrefslogtreecommitdiffstats
path: root/source4/dsdb
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2014-11-04 04:17:35 +0100
committerAndrew Bartlett <abartlet@samba.org>2015-02-03 05:02:11 +0100
commitdef9d268681625c2431e53d842f22a01af72c95c (patch)
treeef0c70369a2a0c5fb2ea634e86c2b9b1afd5bf24 /source4/dsdb
parent78f848419d80fe3184abfc6c06e13934d4d5a97c (diff)
downloadsamba-def9d268681625c2431e53d842f22a01af72c95c.tar.gz
samba-def9d268681625c2431e53d842f22a01af72c95c.tar.xz
samba-def9d268681625c2431e53d842f22a01af72c95c.zip
s4-dsdb: Mark request during Tombstone reanimation with custom LDAP control
We are going to need this so that underlying modules (acl.c) can treat those requests properly Change-Id: I6c12069aa6e7e01197dddda6c610d930d3fd9cb0 Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c b/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c
index 1f3bba8364..c175a0cbc4 100644
--- a/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c
+++ b/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c
@@ -144,6 +144,13 @@ static int _tr_do_rename(struct ldb_module *module, struct ldb_request *parent_r
return ret;
}
+ /* mark request as part of Tombstone reanimation */
+ ret = ldb_request_add_control(req, DSDB_CONTROL_RESTORE_TOMBSTONE_OID, false, NULL);
+ if (ret != LDB_SUCCESS) {
+ talloc_free(tmp_ctx);
+ return ret;
+ }
+
/*
* Run request from the top module
* so we get show_deleted control OID resolved
@@ -187,6 +194,13 @@ static int _tr_do_modify(struct ldb_module *module, struct ldb_request *parent_r
return ret;
}
+ /* mark request as part of Tombstone reanimation */
+ ret = ldb_request_add_control(mod_req, DSDB_CONTROL_RESTORE_TOMBSTONE_OID, false, NULL);
+ if (ret != LDB_SUCCESS) {
+ talloc_free(tmp_ctx);
+ return ret;
+ }
+
/* Run request from Next module */
ret = ldb_next_request(module, mod_req);
if (ret == LDB_SUCCESS) {