From 58e89443e2e1722dec85ec426a63449b53b19ea3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2011 12:24:25 +1000 Subject: ldb: don't shortcut dn comparison for mismatched special DNs DNs that start with @ can't be compared via string comparison with normal DNs Pair-Programmed-With: Andrew Bartlett --- lib/ldb/common/ldb_dn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ldb/common') diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c index cd9055da92..6b1ef0306f 100644 --- a/lib/ldb/common/ldb_dn.c +++ b/lib/ldb/common/ldb_dn.c @@ -1034,7 +1034,7 @@ int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn) if ( ! dn || dn->invalid) return -1; if (( ! base->valid_case) || ( ! dn->valid_case)) { - if (base->linearized && dn->linearized) { + if (base->linearized && dn->linearized && dn->special == base->special) { /* try with a normal compare first, if we are lucky * we will avoid exploding and casfolding */ int dif; -- cgit