s4:rootdse: fix the logic to indentify a rootdse search
authorAndrew Bartlett <abartlet@samba.org>
Tue, 16 Dec 2008 08:01:35 +0000 (09:01 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 17 Dec 2008 01:29:28 +0000 (12:29 +1100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/dsdb/samdb/ldb_modules/rootdse.c

index 04a97fcd3bb66d0ab479a61533a356efddb5bb54..461a554ec055cd03ca5f8357ff266f850c5d9e53 100644 (file)
@@ -301,8 +301,7 @@ static int rootdse_search(struct ldb_module *module, struct ldb_request *req)
        int ret;
 
        /* see if its for the rootDSE - only a base search on the "" DN qualifies */
-       if (req->op.search.scope != LDB_SCOPE_BASE ||
-           ( ! ldb_dn_is_null(req->op.search.base))) {
+       if (!(req->op.search.scope == LDB_SCOPE_BASE && ldb_dn_is_null(req->op.search.base))) {
                /* Otherwise, pass down to the rest of the stack */
                return ldb_next_request(module, req);
        }