diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-24 07:16:50 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-24 10:36:45 -0700 |
commit | 41e409370b1c8c8572ead30d7f79bfd2dd6f4118 (patch) | |
tree | 6f3b78e2254552ab75b0e73b3fae977564254ab8 /source4/dsdb/samdb/ldb_modules | |
parent | f8a09e8fb32e23deb59a62f1e110724bb39b0508 (diff) | |
download | samba-41e409370b1c8c8572ead30d7f79bfd2dd6f4118.tar.gz samba-41e409370b1c8c8572ead30d7f79bfd2dd6f4118.tar.bz2 samba-41e409370b1c8c8572ead30d7f79bfd2dd6f4118.zip |
s4-ldb: add instanceType in repl_meta_data module
We need to add instanceType on new records if not added by caller. This is needed in repl_meta_data
to ensure we fill in the meta data for replication
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 8 |
1 files changed, 8 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 bb1c5bb1a1..1af96220b5 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -523,6 +523,14 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req) ldb_msg_remove_attr(msg, "uSNChanged"); ldb_msg_remove_attr(msg, "replPropertyMetaData"); + if (!ldb_msg_find_element(req->op.add.message, "instanceType")) { + ret = ldb_msg_add_fmt(msg, "instanceType", "%u", INSTANCE_TYPE_WRITE); + if (ret != LDB_SUCCESS) { + ldb_oom(ldb); + return LDB_ERR_OPERATIONS_ERROR; + } + } + /* * readd replicated attributes */ |