diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-13 10:53:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:40:32 -0500 |
commit | 7ff19c935de67089f7a807bafb1f6e206ff6c585 (patch) | |
tree | 289498818e5d6c1364eabd42553f540f65e5edfa /source4/dsdb/samdb | |
parent | 2c5a1e6bdde646fd51f36eb31043be0783cea0b1 (diff) | |
download | samba-7ff19c935de67089f7a807bafb1f6e206ff6c585.tar.gz samba-7ff19c935de67089f7a807bafb1f6e206ff6c585.tar.bz2 samba-7ff19c935de67089f7a807bafb1f6e206ff6c585.zip |
r20726: - only add the rdn attribute and it's meta_data when the 'name' attribute is there
- add the values for objectGUID and whenChanged inside the ldb module,
so that the ldb module has only replicated attributes as input
metze
(This used to be commit 0ecb07e0526462529fb21cec30e789a9002b30a1)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 19 | ||||
-rw-r--r-- | source4/dsdb/samdb/samdb.h | 1 |
2 files changed, 20 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 ca0291affd..498cf6a94f 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -446,6 +446,15 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) uint64_t seq_num; int ret; + /* + * TODO: check if the parent object exist + */ + + /* + * TODO: handle the conflict case where an object with the + * same name exist + */ + msg = ar->objs->objects[ar->index_current].msg; md = ar->objs->objects[ar->index_current].meta_data; @@ -454,6 +463,16 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) return replmd_replicated_request_error(ar, ret); } + ret = ldb_msg_add_value(msg, "objectGUID", &ar->objs->objects[ar->index_current].guid_value, NULL); + if (ret != LDB_SUCCESS) { + return replmd_replicated_request_error(ar, ret); + } + + ret = ldb_msg_add_string(msg, "whenChanged", ar->objs->objects[ar->index_current].when_changed); + if (ret != LDB_SUCCESS) { + return replmd_replicated_request_error(ar, ret); + } + ret = samdb_msg_add_uint64(ar->module->ldb, msg, msg, "uSNCreated", seq_num); if (ret != LDB_SUCCESS) { return replmd_replicated_request_error(ar, ret); diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h index 0a4804dfb3..f1b5b8616d 100644 --- a/source4/dsdb/samdb/samdb.h +++ b/source4/dsdb/samdb/samdb.h @@ -44,6 +44,7 @@ struct dsdb_control_replicated_object { struct dsdb_extended_replicated_object { struct ldb_message *msg; struct ldb_val guid_value; + const char *when_changed; struct replPropertyMetaDataBlob *meta_data; }; |