From 149d9d82db4d030832dcb050e3c4e128820e089d Mon Sep 17 00:00:00 2001 From: Evgeny Sinelnikov Date: Thu, 12 Oct 2017 07:26:51 +0300 Subject: [PATCH] extended_dn_out: skip one-way links for explicitly requested attributes (#13078) Signed-off-by: Evgeny Sinelnikov --- source4/dsdb/samdb/ldb_modules/extended_dn_out.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c index ad4603f..2664251 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c @@ -601,9 +601,11 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares, /* note that we don't fixup objectCategory as it should not be possible to move - objectCategory elements in the schema */ + objectCategory elements in the schema, + also we don't fixup explicitly requested attributes */ if (attribute->one_way_link && - strcasecmp(attribute->lDAPDisplayName, "objectCategory") != 0) { + strcasecmp(attribute->lDAPDisplayName, "objectCategory") != 0 && + (!req->op.search.attrs || !is_attr_in_list(req->op.search.attrs, attribute->lDAPDisplayName))) { bool remove_value; ret = fix_one_way_link(ac, dn, is_deleted_objects, &remove_value, attribute->linkID); -- 2.10.2