ITS#9000 memberof: noop a noop rename

This commit is contained in:
Ondřej Kuzník 2019-06-05 14:32:24 +02:00
parent eb5a58487b
commit 75e0eba1f7
2 changed files with 11 additions and 0 deletions

View File

@ -364,6 +364,12 @@ memberof_value_modify(
struct berval values[ 4 ], nvalues[ 4 ];
int mcnt = 0;
if ( old_ndn != NULL && new_ndn != NULL &&
ber_bvcmp( old_ndn, new_ndn ) == 0 ) {
/* DNs compare equal, it's a noop */
return;
}
op2.o_tag = LDAP_REQ_MODIFY;
op2.o_req_dn = *ndn;

View File

@ -260,6 +260,11 @@ $LDAPMODIFY -h $LOCALHOST -p $PORT1 \
>> $TESTOUT 2>&1 << EOF
dn: cn=Cartoonia,ou=Groups,$BASEDN
changetype: modrdn
newrdn: cn=Toon town
deleteoldrdn: 1
dn: cn=Toon town,ou=Groups,$BASEDN
changetype: modrdn
newrdn: cn=Toon Town
deleteoldrdn: 1
EOF