summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/operational.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index 4ce8b8fdda..c642ad8c92 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -721,10 +721,20 @@ static int operational_search_post_process(struct ldb_module *module,
continue;
}
case OPERATIONAL_SD_FLAGS:
- if (controls_flags->sd ||
- ldb_attr_in_list(attrs_from_user, operational_remove[i].attr)) {
+ if (ldb_attr_in_list(attrs_from_user, operational_remove[i].attr)) {
continue;
}
+ if (controls_flags->sd) {
+ if (attrs_from_user == NULL) {
+ continue;
+ }
+ if (attrs_from_user[0] == NULL) {
+ continue;
+ }
+ if (ldb_attr_in_list(attrs_from_user, "*")) {
+ continue;
+ }
+ }
ldb_msg_remove_attr(msg, operational_remove[i].attr);
break;
}