summaryrefslogtreecommitdiffstats
path: root/source4/dsdb
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@symas.com>2014-11-04 20:24:11 +0200
committerAndrew Bartlett <abartlet@samba.org>2015-02-03 05:02:11 +0100
commit2aa2e9afa2fa77480abe43ce51f818c5885c08ff (patch)
treec9e1225863cf6229178c40c9a6159a03b315b010 /source4/dsdb
parentd6334925ab6687bff464fd1a4d4d792a8d37c3a4 (diff)
downloadsamba-2aa2e9afa2fa77480abe43ce51f818c5885c08ff.tar.gz
samba-2aa2e9afa2fa77480abe43ce51f818c5885c08ff.tar.xz
samba-2aa2e9afa2fa77480abe43ce51f818c5885c08ff.zip
s4-dsdb: Some minor fixes in tombstone_reanimate, to make it work with acl
Change-Id: Idad221c7ecf778fd24f6017bb4c6eacac541086a Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c b/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c
index c175a0cbc4..6ff98003b1 100644
--- a/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c
+++ b/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c
@@ -138,7 +138,7 @@ static int _tr_do_rename(struct ldb_module *module, struct ldb_request *parent_r
return ret;
}
- ret = dsdb_request_add_controls(req, DSDB_SEARCH_SHOW_DELETED);
+ ret = ldb_request_add_control(req, LDB_CONTROL_SHOW_DELETED_OID, false, NULL);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
@@ -155,7 +155,7 @@ static int _tr_do_rename(struct ldb_module *module, struct ldb_request *parent_r
* Run request from the top module
* so we get show_deleted control OID resolved
*/
- ret = ldb_request(ldb_module_get_ctx(module), req);
+ ret = ldb_next_request(module, req);
if (ret == LDB_SUCCESS) {
ret = ldb_wait(req->handle, LDB_WAIT_ALL);
}
@@ -263,7 +263,7 @@ static int tombstone_reanimate_modify(struct ldb_module *module, struct ldb_requ
ret = _tr_do_rename(module, req, req->op.mod.message->dn, dn_new);
if (ret != LDB_SUCCESS) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Renaming object to %s has failed with %s\n", el_dn->values[0].data, ldb_strerror(ret));
- if (ret != LDB_ERR_ENTRY_ALREADY_EXISTS) {
+ if (ret != LDB_ERR_ENTRY_ALREADY_EXISTS && ret != LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS ) {
/* Windows returns Operations Error in case we can't rename the object */
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -298,7 +298,7 @@ static int tombstone_reanimate_modify(struct ldb_module *module, struct ldb_requ
}
ret = _tr_do_modify(module, req, msg);
if (ret != LDB_SUCCESS) {
- return ldb_operr(ldb);
+ return ret;
}
return ldb_module_done(ac->req, NULL, NULL, LDB_SUCCESS);