r25965: Remove duplicate block - thanks metze!
authorAndrew Bartlett <abartlet@samba.org>
Thu, 15 Nov 2007 10:05:22 +0000 (11:05 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:45:21 +0000 (05:45 +0100)
Andrew Bartlett
(This used to be commit d7e65da56454bc7721083e0aa7fa2e9c47f2b79d)

source4/lib/ldb/ldb_tdb/ldb_search.c

index 1fa20740a51c2d4430ee8954f8173c888936aa0a..bf6bd91fc2913a742f8d923b97ccc5e635e40be9 100644 (file)
@@ -547,24 +547,6 @@ int ltdb_search(struct ldb_module *module, struct ldb_request *req)
                                       ldb_dn_get_linearized(req->op.search.base));
                ret = LDB_ERR_INVALID_DN_SYNTAX;
 
-       } else if (ldb_dn_is_null(req->op.search.base) == true) {
-
-               /* Check what we should do with a NULL dn */
-               switch (req->op.search.scope) {
-               case LDB_SCOPE_BASE:
-                       ldb_asprintf_errstring(module->ldb, 
-                                              "NULL Base DN invalid for a base search");
-                       ret = LDB_ERR_INVALID_DN_SYNTAX;
-               case LDB_SCOPE_ONELEVEL:
-                       ldb_asprintf_errstring(module->ldb, 
-                                              "NULL Base DN invalid for a one-level search");
-                       ret = LDB_ERR_INVALID_DN_SYNTAX;        
-               case LDB_SCOPE_SUBTREE:
-               default:
-                       /* We accept subtree searches from a NULL base DN, ie over the whole DB */
-                       ret = LDB_SUCCESS;
-               }
-
        } else if (ltdb->check_base) {
                /* This database has been marked as 'checkBaseOnSearch', so do a spot check of the base dn */
                ret = ltdb_search_base(module, req->op.search.base);