From 16279c67702671c3b5a620fa9372fa77a67eaaf5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 11 Oct 2005 12:25:55 +0000 Subject: r10895: allow 'dn=string' searches to work again. Windows doesn't allow these, but they are so very useful for things like dn=@MODULES that I think its worth supporting them (This used to be commit e2e3193a98b0f81c7bdb02c98db375ca0449022a) --- source4/lib/ldb/common/ldb_match.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source4') diff --git a/source4/lib/ldb/common/ldb_match.c b/source4/lib/ldb/common/ldb_match.c index 78e4304f6c..14031a6dd1 100644 --- a/source4/lib/ldb/common/ldb_match.c +++ b/source4/lib/ldb/common/ldb_match.c @@ -151,13 +151,8 @@ static int ldb_match_equality(struct ldb_context *ldb, struct ldb_dn *valuedn; int ret; - /* catch the old method of dn matching */ - if (ldb_attr_cmp(tree->u.equality.attr, "dn") == 0) { - ldb_debug(ldb, LDB_DEBUG_FATAL, "attempt to match on 'dn' - should use distinguishedName"); - return 0; - } - - if (ldb_attr_cmp(tree->u.equality.attr, "distinguishedName") == 0) { + if (ldb_attr_cmp(tree->u.equality.attr, "dn") == 0 || + ldb_attr_cmp(tree->u.equality.attr, "distinguishedName") == 0) { valuedn = ldb_dn_explode_casefold(ldb, tree->u.equality.value.data); if (valuedn == NULL) { return 0; -- cgit