dsdb-show_deleted: Check if the base DN is deleted before doing a full search fix-deleted-searches
authorAndrew Bartlett <abartlet@samba.org>
Sat, 22 Jun 2013 12:44:10 +0000 (22:44 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 7 Oct 2013 19:19:16 +0000 (08:19 +1300)
commitdb07060e8999d746a5d1282aa0f8fdcbc35a032b
tree392998d2b8d96790ebfec07768cb0f964f11a048
parentedd86ff732586eb46305674d6bd3dc66a173c9ab
dsdb-show_deleted: Check if the base DN is deleted before doing a full search

This avoids doing more work than we need to, such as a full database
scan, if the base DN is deleted.  The tdb layer cannot handle this
because we do not know to check for the isDeleted attribute there.

This was inspired by an investigation of the samr.large-dc test, which
is slow in part because of attempted SD propegation on the deleted DNs.

The samba3sam code is not compatible with this change (which implies
having checkBaseOnSearch: TRUE set on @OPTIONS), so this module is now
replaced with show_deleted_dummy for this test.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/show_deleted.c