From 57cb544754cae5f941f76a04a9b99a832ebee06b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 17 Jan 2001 02:54:27 +0000 Subject: [PATCH] Add newSuperior == oldSuperior fix from devel --- servers/slapd/back-ldbm/modrdn.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 7367f2ad8b..38572293a9 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -184,7 +184,17 @@ ldbm_back_modrdn( np_ndn = ch_strdup( np_dn ); (void) dn_normalize( np_ndn ); - /* newSuperior == oldParent?, if so ==> ERROR */ + /* newSuperior == oldParent? */ + if ( strcmp( p_ndn, np_ndn ) == 0 ) { + Debug( LDAP_DEBUG_TRACE, + "ldbm_back_modrdn: new parent \"%s\" seems to be the same as old parent \"%s\"...\n", + newSuperior, p_dn, 0 ); + newSuperior = NULL; /* ignore newSuperior */ + } + } + + if ( newSuperior != NULL ) { + /* newSuperior == entry being moved?, if so ==> ERROR */ /* Get Entry with dn=newSuperior. Does newSuperior exist? */ -- 2.47.2