From e446ef1c3fc3ebcc511caf5d1d94804cfb7a8202 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 16 Sep 2010 14:37:11 +0200 Subject: s4:rootdse LDB module - remove "priv" checks where not needed Signed-off-by: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/rootdse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4') 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) { -- cgit