From: Stefan Metzmacher Date: Wed, 28 Feb 2018 07:04:58 +0000 (+0100) Subject: dsdb:extended_dn_store: ignore DRSUAPI_ATTID_distinguishedName attributes X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=c406ecce5a5b4151f7cd72f5cce41275d47954de;p=metze%2Fsamba%2Fwip.git dsdb:extended_dn_store: ignore DRSUAPI_ATTID_distinguishedName attributes We have several tests which already test that, we can avoid doing searches at all in that case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13307 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c index a32ab8d6f935..8829de03a051 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c @@ -331,6 +331,11 @@ static int extended_dn_add(struct ldb_module *module, struct ldb_request *req) continue; } + if (schema_attr->attributeID_id == DRSUAPI_ATTID_distinguishedName) { + /* distinguishedName values are ignored */ + continue; + } + /* Before we setup a procedure to modify the incoming message, we must copy it */ if (!ac->new_req) { struct ldb_message *msg = ldb_msg_copy(ac, req->op.add.message); @@ -413,6 +418,11 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req continue; } + if (schema_attr->attributeID_id == DRSUAPI_ATTID_distinguishedName) { + /* distinguishedName values are ignored */ + continue; + } + /* Before we setup a procedure to modify the incoming message, we must copy it */ if (!ac->new_req) { struct ldb_message *msg = ldb_msg_copy(ac, req->op.mod.message);