From 514f605ef5c113998be8bd1c046d54e1fc91d24a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 28 Dec 2001 09:48:52 +0000 Subject: [PATCH] Fix modrdn newSuperior checks --- servers/slapd/back-bdb/modrdn.c | 2 +- servers/slapd/back-ldbm/modrdn.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index c67b5a3180..15c4973495 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -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 ); diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index d62ca57599..107986c9ff 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -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? */ -- 2.39.5