summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-30 20:05:02 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:56 +1100
commit8eaed073a7c60986ecd02c3cc4beb53bd66772c6 (patch)
tree72e0334588650b4d09ef3cabbc0ee448b9ddf34b
parent9819d280d69e5870d61a177923912eae0c573709 (diff)
downloadsamba-8eaed073a7c60986ecd02c3cc4beb53bd66772c6.tar.gz
samba-8eaed073a7c60986ecd02c3cc4beb53bd66772c6.tar.bz2
samba-8eaed073a7c60986ecd02c3cc4beb53bd66772c6.zip
s4-dsdb: make sure 'whenChanged' is set on modify
We also should preserve (and then replace) whenChanged on delete
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index ab412942e9..202b74e8b4 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1939,6 +1939,9 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
return LDB_ERR_OPERATIONS_ERROR;
}
+ ldb_msg_remove_attr(msg, "whenChanged");
+ ldb_msg_remove_attr(msg, "uSNChanged");
+
ret = replmd_update_rpmd(module, ac->schema, msg, &ac->seq_num, t);
if (ret != LDB_SUCCESS) {
talloc_free(ac);
@@ -2205,7 +2208,7 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
"oMSyntax", "proxiedObjectName", "name", "replPropertyMetaData", "sAMAccountName",
"securityIdentifier", "sIDHistory", "subClassOf", "systemFlags", "trustPartner", "trustDirection",
"trustType", "trustAttributes", "userAccountControl", "uSNChanged", "uSNCreated", "whenCreated",
- NULL};
+ "whenChanged", NULL};
uint32_t el_count = 0;
int i;