Author: tridge
Date: 2005-10-11 12:25:55 +0000 (Tue, 11 Oct 2005)
New Revision: 10895

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10895

Log:

allow 'dn=string' searches to work again. Windows doesn't allow these,
but they are so very useful for things like [EMAIL PROTECTED] that I think
its worth supporting them

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_match.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_match.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_match.c        2005-10-11 
11:00:16 UTC (rev 10894)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_match.c        2005-10-11 
12:25:55 UTC (rev 10895)
@@ -151,13 +151,8 @@
        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;

Reply via email to