>From 62bec542e961f109e72f7346093f6aff09e21e48 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 30 Dec 2012 02:27:25 -0800 Subject: [PATCH] acl: Do not applying ACL on special DNs This fix frequent reindexing when using python script with a user that is not system --- source4/dsdb/samdb/ldb_modules/acl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c index 9bf2612..c600587 100644 --- a/source4/dsdb/samdb/ldb_modules/acl.c +++ b/source4/dsdb/samdb/ldb_modules/acl.c @@ -1670,6 +1670,13 @@ static int acl_search(struct ldb_module *module, struct ldb_request *req) ac->constructed_attrs |= ac->allowedAttributesEffective; ac->constructed_attrs |= ac->sDRightsEffective; + /* There are no operational attributes on special DNs */ + + if (ldb_dn_is_special(req->op.search.base)) { + return ldb_next_request(module, req); + } + + if (data == NULL) { ac->modify_search = false; } -- 1.7.9.5