From 12166497729252469ac3ffbf0495842cdc85cff0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Aug 2011 17:35:45 +1000 Subject: s4-dsdb: enforce NULL DN validity in partition module windows does not allow a search on the empty DN except for rootDSE searches or for phantom_root searches (ie. with --cross-ncs). By enforcing this in Samba we make it more likely that our tests and utilities will work against windows Pair-Programmed-With: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/partition.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index ba77ca0ad1..b2865487d2 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -542,6 +542,9 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req) /* Search from the base DN */ if (ldb_dn_is_null(req->op.search.base)) { + if (!phantom_root) { + return ldb_error(ldb, LDB_ERR_NO_SUCH_OBJECT, "empty base DN"); + } return partition_send_all(module, ac, req); } -- cgit