s4/dsdb: Fixed partition_search() not to pass special DN's to LDAP backend.
authorEndi S. Dewata <edewata@redhat.com>
Mon, 28 Jun 2010 15:54:37 +0000 (10:54 -0500)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 28 Jun 2010 17:33:45 +0000 (19:33 +0200)
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
source4/dsdb/samdb/ldb_modules/partition.c

index 6c0d9cdd4ed1bb6937102d45e86882d67395d017..d022d128e9bce4fce1dab5ac373d0b0ea64150fa 100644 (file)
@@ -470,12 +470,14 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
                return ret;
        }
 
-       p = find_partition(data, NULL, req);
-       if (p != NULL) {
-               /* the caller specified what partition they want the
-                * search - just pass it on
-                */
-               return ldb_next_request(p->module, req);                
+       if (!ldb_dn_is_special(req->op.search.base)) {
+               p = find_partition(data, NULL, req);
+               if (p != NULL) {
+                       /* the caller specified what partition they want the
+                       * search - just pass it on
+                       */
+                       return ldb_next_request(p->module, req);
+               }
        }
 
        /* Get back the search options from the search control, and mark it as