From: Andrew Bartlett Date: Tue, 15 Mar 2016 02:09:50 +0000 (+1300) Subject: dsdb: Clearly fail to replicate objects not NC_HEAD with a all-zero parentGUID X-Git-Tag: tdb-1.3.10~977 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e21a5ad619c8c3611abb0d3c3a513c62ebc7c2a;p=thirdparty%2Fsamba.git dsdb: Clearly fail to replicate objects not NC_HEAD with a all-zero parentGUID Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c index 33dd8211e34..d2acff30b5b 100644 --- a/source4/dsdb/repl/replicated_objects.c +++ b/source4/dsdb/repl/replicated_objects.c @@ -616,6 +616,11 @@ WERROR dsdb_convert_object_ex(struct ldb_context *ldb, if (in->parent_object_guid == NULL) { out->parent_guid = NULL; + if ((instanceType & INSTANCE_TYPE_IS_NC_HEAD) == 0) { + DEBUG(0, ("Refusing to replicate %s from a server that did not provide a parentGUID!\n", + ldb_dn_get_linearized(msg->dn))); + return WERR_DS_DRA_INCONSISTENT_DIT; + } } else { out->parent_guid = talloc(mem_ctx, struct GUID); W_ERROR_HAVE_NO_MEMORY(out->parent_guid);