diff options
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/repl_meta_data.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 9 |
1 files changed, 9 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 95cd0694fc..7838b65fdf 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -2147,6 +2147,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req) struct loadparm_context *lp_ctx; char *referral; unsigned int functional_level; + const DATA_BLOB *guid_blob; /* do not manipulate our control entries */ if (ldb_dn_is_special(req->op.mod.message->dn)) { @@ -2166,6 +2167,14 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req) return LDB_ERR_OPERATIONS_ERROR; } + guid_blob = ldb_msg_find_ldb_val(req->op.mod.message, "objectGUID"); + if ( guid_blob != NULL ) { + ldb_debug_set(ldb, LDB_DEBUG_ERROR, + "replmd_modify: it's not allowed to change the objectGUID\n"); + talloc_free(ac); + return LDB_ERR_CONSTRAINT_VIOLATION; + } + /* we have to copy the message as the caller might have it as a const */ msg = ldb_msg_copy_shallow(ac, req->op.mod.message); if (msg == NULL) { |