]> git.sur5r.net Git - openldap/commitdiff
Fix modrdn newSuperior checks
authorHoward Chu <hyc@openldap.org>
Fri, 28 Dec 2001 09:48:52 +0000 (09:48 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 28 Dec 2001 09:48:52 +0000 (09:48 +0000)
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-ldbm/modrdn.c

index c67b5a31805356ced192a8114c6e5788f21727de..15c4973495d966a7fd63e93c823bad43d10a2689 100644 (file)
@@ -268,7 +268,7 @@ retry:      /* transaction retry */
 
        new_parent_dn = &p_dn;  /* New Parent unless newSuperior given */
 
-       if ( newSuperior != NULL ) {
+       if ( newSuperior->bv_val != NULL ) {
                Debug( LDAP_DEBUG_TRACE, 
                        "bdb_modrdn: new parent \"%s\" requested...\n",
                        newSuperior->bv_val, 0, 0 );
index d62ca575998151d04ccbe8e7ecf7e4ca161989cd..107986c9ffc9582ba809f0246afb92dfa63a6b15 100644 (file)
@@ -281,7 +281,7 @@ ldbm_back_modrdn(
 
        new_parent_dn = &p_dn;  /* New Parent unless newSuperior given */
 
-       if ( newSuperior != NULL ) {
+       if ( newSuperior->bv_val != NULL ) {
 #ifdef NEW_LOGGING
                LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
                        "ldbm_back_modrdn: new parent \"%s\" requested\n",
@@ -314,7 +314,7 @@ ldbm_back_modrdn(
                }
        }
 
-       if ( newSuperior != NULL ) {
+       if ( newSuperior && newSuperior->bv_val != NULL ) {
                /* newSuperior == entry being moved?, if so ==> ERROR */
                /* Get Entry with dn=newSuperior. Does newSuperior exist? */