diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2014-10-27 05:31:54 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-02-03 05:02:10 +0100 |
commit | 5921bb84ab54123d68691e63154f22ed124f6be4 (patch) | |
tree | acf1cca512853d8b22fe543601bd87b231719f4b /source4/dsdb | |
parent | ffdc834bd1433aa100ba57ae9e47fa09e591b8f7 (diff) | |
download | samba-5921bb84ab54123d68691e63154f22ed124f6be4.tar.gz samba-5921bb84ab54123d68691e63154f22ed124f6be4.tar.xz samba-5921bb84ab54123d68691e63154f22ed124f6be4.zip |
s4-dsdb: Initialize module context only we are to handle Tombstone request
Change-Id: I73bd2043e96907e3d1a669bdbd943ddee1df8c0a
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c b/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c index 321f16b463..534b5f8373 100644 --- a/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c +++ b/source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c @@ -177,16 +177,16 @@ static int tombstone_reanimate_modify(struct ldb_module *module, struct ldb_requ return ldb_next_request(module, req); } - ac = tr_init_context(module, req); - if (ac == NULL) { - return ldb_operr(ldb); - } - /* Check if this is a reanimate request */ if (!is_tombstone_reanimate_request(req, &el_dn)) { return ldb_next_request(module, req); } + ac = tr_init_context(module, req); + if (ac == NULL) { + return ldb_operr(ldb); + } + /* Load original object */ ret = dsdb_module_search_dn(module, req, &res_obj, req->op.mod.message->dn, NULL, DSDB_FLAG_TOP_MODULE | DSDB_SEARCH_SHOW_DELETED, req); if (ret != LDB_SUCCESS) { |