summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-21 21:27:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:53 +1100
commit0bf7f952735e848700122c9ced064d211831ba7c (patch)
tree9b5143897a17f01305cbbf1833c71dccc90e785f
parent530503290d029894d3b0f0bc4f3c058752e904fb (diff)
downloadsamba-0bf7f952735e848700122c9ced064d211831ba7c.tar.gz
samba-0bf7f952735e848700122c9ced064d211831ba7c.tar.bz2
samba-0bf7f952735e848700122c9ced064d211831ba7c.zip
s4-drs: isRecycled only exists in FL W2K8-R2
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index ae7dcc1954..9994b9566d 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -2280,6 +2280,19 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
}
msg->elements[el_count++].flags = LDB_FLAG_MOD_ADD;
+ /* we also mark it as recycled, meaning this object can't be
+ recovered (we are stripping its attributes) */
+ if (dsdb_functional_level(ldb) >= DS_DOMAIN_FUNCTION_2008_R2) {
+ ret = ldb_msg_add_string(msg, "isRecycled", "TRUE");
+ if (ret != LDB_SUCCESS) {
+ DEBUG(0,(__location__ ": Failed to add isRecycled string to the msg\n"));
+ ldb_module_oom(module);
+ talloc_free(tmp_ctx);
+ return ret;
+ }
+ msg->elements[el_count++].flags = LDB_FLAG_MOD_ADD;
+ }
+
/* we need the storage form of the parent GUID */
ret = dsdb_module_search_dn(module, tmp_ctx, &parent_res,
ldb_dn_get_parent(tmp_ctx, old_dn), NULL,