Return LDAP_SUCCESS on mods on a referral entry.

We currently return LDAP_REFERRAL which causes the mod to fail meaning
that referral entries cannot be changed.

All we really want to do is escape when we don't hvae an entry to modify.

https://fedorahosted.org/freeipa/ticket/2237
This commit is contained in:
Rob Crittenden 2012-05-10 10:27:50 -04:00 committed by Martin Kosek
parent 1565ce3a8c
commit 58732a83bc

View File

@ -817,6 +817,15 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
ret = slapi_search_internal_get_entry(tmp_dn, NULL, &e, getPluginID());
slapi_sdn_free(&tmp_dn);
if (ret == LDAP_REFERRAL) {
/* we have a referral so nothing for us to do, but return
* success so we allow the MOD to proceed.
*/
ret = LDAP_SUCCESS;
free_entry = true;
goto done;
}
if (ret) {
/* ok a client tried to modify an entry that doesn't exist.
* Nothing to see here, move along ... */