summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-11-01 23:12:47 +0100
committerMatthieu Patou <mat@samba.org>2011-12-23 07:57:21 +0100
commitea9fb5cad84595aca3544df521607616aec9041d (patch)
tree2ccac46f94f73acdf73ae787b058325f808a302e /source4
parent271c7d9251059c38a815ad47034bc478752a0167 (diff)
downloadsamba-ea9fb5cad84595aca3544df521607616aec9041d.tar.gz
samba-ea9fb5cad84595aca3544df521607616aec9041d.tar.bz2
samba-ea9fb5cad84595aca3544df521607616aec9041d.zip
s4-ldb: Add isRecycled when is defined in the schema
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index eb5d036e62..daca5da5bb 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -3008,9 +3008,15 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
case OBJECT_RECYCLED:
case OBJECT_TOMBSTONE:
- /* we also mark it as recycled, meaning this object can't be
- recovered (we are stripping its attributes) */
- if (functional_level >= DS_DOMAIN_FUNCTION_2008_R2) {
+ /*
+ * we also mark it as recycled, meaning this object can't be
+ * recovered (we are stripping its attributes).
+ * This is done only if we have this schema object of course ...
+ * This behavior is identical to the one of Windows 2008R2 which
+ * always set the isRecycled attribute, even if the recycle-bin is
+ * not activated and what ever the forest level is.
+ */
+ if (dsdb_attribute_by_lDAPDisplayName(schema, "isRecycled") != NULL) {
ret = ldb_msg_add_string(msg, "isRecycled", "TRUE");
if (ret != LDB_SUCCESS) {
DEBUG(0,(__location__ ": Failed to add isRecycled string to the msg\n"));