diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/descriptor.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index db8bba7395..a876346b60 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -739,9 +739,20 @@ static int descriptor_search(struct ldb_module *module, struct ldb_request *req) struct ldb_control *sd_control; struct ldb_request *down_req; struct descriptor_context *ac; + bool show_sd = false; sd_control = ldb_request_get_control(req, LDB_CONTROL_SD_FLAGS_OID); - if (!sd_control) { + if (sd_control != NULL) { + show_sd = true; + } + + if (!show_sd && + ldb_attr_in_list(req->op.search.attrs, "nTSecurityDescriptor")) + { + show_sd = true; + } + + if (!show_sd) { return ldb_next_request(module, req); } |