If the DN is not valid the ltdb_search_dn1() will catch it with ldb_dn_validate() which
is the only safe way to check this. ldb_dn_is_valid() does not actually check, but instead
returns only the result of the previous checks, if there was one.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
/* We accept subtree searches from a NULL base DN, ie over the whole DB */
ret = LDB_SUCCESS;
}
- } else if (ldb_dn_is_valid(req->op.search.base) == false) {
-
- /* We don't want invalid base DNs here */
- ldb_asprintf_errstring(ldb,
- "Invalid Base DN: %s",
- ldb_dn_get_linearized(req->op.search.base));
- ret = LDB_ERR_INVALID_DN_SYNTAX;
-
} else if (req->op.search.scope == LDB_SCOPE_BASE) {
/*