diff options
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/rootdse.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 102cd90ce2..300f622486 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -329,14 +329,14 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms } } - if (priv && do_attribute(attrs, "domainFunctionality")) { + if (do_attribute(attrs, "domainFunctionality")) { if (ldb_msg_add_fmt(msg, "domainFunctionality", "%d", dsdb_functional_level(ldb)) != LDB_SUCCESS) { goto failed; } } - if (priv && do_attribute(attrs, "forestFunctionality") + if (do_attribute(attrs, "forestFunctionality") && (val = talloc_get_type(ldb_get_opaque(ldb, "forestFunctionality"), int))) { if (ldb_msg_add_fmt(msg, "forestFunctionality", "%d", *val) != LDB_SUCCESS) { @@ -344,7 +344,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms } } - if (priv && do_attribute(attrs, "domainControllerFunctionality") + if (do_attribute(attrs, "domainControllerFunctionality") && (val = talloc_get_type(ldb_get_opaque(ldb, "domainControllerFunctionality"), int))) { if (ldb_msg_add_fmt(msg, "domainControllerFunctionality", "%d", *val) != LDB_SUCCESS) { |