From 58732a83bc4ea99ce9894f07232b890ae26682ef Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 10 May 2012 10:27:50 -0400 Subject: [PATCH] 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 --- daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c b/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c index 5430de4c9..2b07de45b 100644 --- a/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c +++ b/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c @@ -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 ... */