]> git.sur5r.net Git - openldap/commitdiff
ITS#5319
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 12 Feb 2008 00:20:28 +0000 (00:20 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 12 Feb 2008 00:20:28 +0000 (00:20 +0000)
CHANGES
servers/slapd/back-bdb/modrdn.c
tests/scripts/test005-modrdn

diff --git a/CHANGES b/CHANGES
index 2ba2e82b03dd3baa9daf9803438f7c6a28e72434..d7a64bfc6bd2c0c566a738952e353e8bf446a503 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@ OpenLDAP 2.3 Change Log
 
 OpenLDAP 2.3.41 Engineering
        Fixed slapd idlcache on adds (ITS#5086)
+       Fixed slapd-bdb modrdn to same dn (ITS#5319)
        Fixed syncrepl propagation of errors (ITS#5282)
        Fixed crash when no-op control is used (ITS#5358)
 
index 6cebe9e04947de56b4071c0fb093a368e6f08cfd..d2bf1cbbc2c267a499c6d5a39b1f5b3271134f71 100644 (file)
@@ -519,6 +519,9 @@ retry:      /* transaction retry */
        case DB_NOTFOUND:
                break;
        case 0:
+               /* Allow rename to same DN */
+               if ( nei == ei )
+                       break;
                rs->sr_err = LDAP_ALREADY_EXISTS;
                goto return_results;
        default:
index 9abb7b710558fd523fcf9c00ea5d7e89bb49e073..0b73a62ce7f926d1de26cf675a8f73b0972301fe 100755 (executable)
@@ -233,6 +233,36 @@ if test $RC -eq 0 ; then
        exit 1
 fi
 
+echo "Testing modrdn with newRdn exact same as target..."
+$LDAPMODRDN -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
+       $TESTOUT 2>&1 'cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com' 'cn=James A Jones 1'
+
+RC=$?
+case $RC in
+0)
+       ;;
+*)
+       echo "ldapmodrdn failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+       ;;
+esac
+
+echo "Testing modrdn with newRdn same as target, changed case..."
+$LDAPMODRDN -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
+       $TESTOUT 2>&1 'cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com' 'cn=James A JONES 1'
+
+RC=$?
+case $RC in
+0)
+       ;;
+*)
+       echo "ldapmodrdn failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+       ;;
+esac
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"