]> git.sur5r.net Git - openldap/commitdiff
I thought the bdn was normalized already... guess not.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 30 Dec 1998 05:21:40 +0000 (05:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 30 Dec 1998 05:21:40 +0000 (05:21 +0000)
servers/slapd/back-ldbm/group.c

index 1b2b2e85815b86b8e8287f71e0ed81fadd943d4d..623aa2c95bcafa21f1c903151cfb8560ccbaa684 100644 (file)
@@ -29,7 +29,7 @@ ldbm_back_group(
 {
         struct ldbminfo *li = (struct ldbminfo *) be->be_private;    
         Entry        *e;
-               char            *tdn;
+               char            *tdn, *xdn; 
         char        *matched;
         Attribute   *objectClass;
         Attribute   *member;
@@ -41,7 +41,9 @@ ldbm_back_group(
                 objectclassValue, groupattrName, 0 ); 
 
        tdn = dn_normalize_case( ch_strdup( target->e_dn ) );
-       if (strcmp(tdn, bdn) == 0) {
+       xdn = dn_normalize_case( ch_strdup( bdn ) );
+       Debug( LDAP_DEBUG_TRACE, "=> ldbm_back_group: tdn: %s\n", tdn, 0, 0 ); 
+       if (strcmp(tdn, xdn) == 0) {
                /* we already have a LOCKED copy of the entry */
                e = target;
                Debug( LDAP_DEBUG_ARGS,
@@ -56,6 +58,7 @@ ldbm_back_group(
                        if (matched != NULL)
                                free(matched);
                        free(tdn);
+                       free(xdn);
                        return( 1 );
                }
                Debug( LDAP_DEBUG_ARGS,
@@ -63,6 +66,7 @@ ldbm_back_group(
                        bdn, 0, 0 ); 
         }
        free(tdn);
+       free(xdn);
 
 
         /* check for deleted */