s4-dsdb: If current attribute list is empty use the one from the request
authorMatthieu Patou <mat@matws.net>
Thu, 14 Apr 2011 18:02:48 +0000 (22:02 +0400)
committerNadezhda Ivanova <nivanova@samba.org>
Fri, 15 Apr 2011 13:28:08 +0000 (16:28 +0300)
This will avoid overwritting attribute list made by upper modules.

Signed-off-by: Nadezhda Ivanova <nivanova@samba.org>
source4/dsdb/samdb/ldb_modules/acl_read.c

index cde6d11c75bd07d4f6dd032e9f01d2b8e78eb2a9..359b39f09b9f844e1bb4288f79ea9e1bbfd778ae 100644 (file)
@@ -305,7 +305,7 @@ static int aclread_search(struct ldb_module *module, struct ldb_request *req)
                /* avoid replacing all attributes with nTSecurityDescriptor
                 * if attribute list is empty */
                if (!attrs) {
-                       attrs = ldb_attr_list_copy_add(ac, attrs, "*");
+                       attrs = ldb_attr_list_copy_add(ac, req->op.search.attrs, "*");
                }
                attrs = ldb_attr_list_copy_add(ac, attrs, "nTSecurityDescriptor");
        }