diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-07-07 23:51:31 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-07-09 08:42:07 +0200 |
commit | d64bc6c9af24109e89632db9133070f2ab827c46 (patch) | |
tree | 2dbf29e5cf8caf1ca376a5b39333cdb8c8f0af07 | |
parent | 9e6349f81edb3914d18bc50473d65c0c1f5bc113 (diff) | |
download | samba-d64bc6c9af24109e89632db9133070f2ab827c46.tar.gz samba-d64bc6c9af24109e89632db9133070f2ab827c46.tar.xz samba-d64bc6c9af24109e89632db9133070f2ab827c46.zip |
s4:dsdb/repl_meta_data: make sure objectGUID can't be deleted
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9763
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 6 |
1 files changed, 3 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 30b3012682..4c5ced4230 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -2474,7 +2474,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req) int ret; bool is_urgent = false, rodc = false; unsigned int functional_level; - const DATA_BLOB *guid_blob; + const struct ldb_message_element *guid_el = NULL; struct ldb_control *sd_propagation_control; struct replmd_private *replmd_private = talloc_get_type(ldb_module_get_private(module), struct replmd_private); @@ -2503,8 +2503,8 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req) ldb_debug(ldb, LDB_DEBUG_TRACE, "replmd_modify\n"); - guid_blob = ldb_msg_find_ldb_val(req->op.mod.message, "objectGUID"); - if ( guid_blob != NULL ) { + guid_el = ldb_msg_find_element(req->op.mod.message, "objectGUID"); + if (guid_el != NULL) { ldb_set_errstring(ldb, "replmd_modify: it's not allowed to change the objectGUID!"); return LDB_ERR_CONSTRAINT_VIOLATION; |