From fab0c5a247951df6be9153211b32abeaf5f6881d Mon Sep 17 00:00:00 2001 From: Thierry Bordaz Date: Mon, 16 Oct 2017 11:21:51 +0200 Subject: [PATCH] Ticket 49064 - RFE allow to enable MemberOf plugin in dedicated consumer Bug Description: memberof triggers some internal updates to add/del 'memberof' values. on a readonly consumer, those updates selects a REFERRAL_ON_UPDATE backend and that is not followed by internal updates. At the end of the day, the update is rejected and if memberof plugin is enabled replication will stuck on that rejected update Fix Description: internal updates from memberof need to bypassing referrals. So they flag internal updates SLAPI_OP_FLAG_BYPASS_REFERRALS, so that mtn_get_be (mapping tree selection) will not return the referrals. https://pagure.io/389-ds-base/issue/49064 Reviewed by: ? Platforms tested: F23 Flag Day: no Doc impact: no --- ldap/servers/plugins/memberof/memberof.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c index a23c52a..8708263 100644 --- a/ldap/servers/plugins/memberof/memberof.c +++ b/ldap/servers/plugins/memberof/memberof.c @@ -609,7 +609,7 @@ memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data) slapi_modify_internal_set_pb_ext( mod_pb, slapi_entry_get_sdn(e), mods, 0, 0, - memberof_get_plugin_id(), 0); + memberof_get_plugin_id(), SLAPI_OP_FLAG_BYPASS_REFERRALS); slapi_modify_internal_pb(mod_pb); @@ -3227,7 +3227,7 @@ memberof_add_memberof_attr(LDAPMod **mods, const char *dn, char *add_oc) mod_pb = slapi_pblock_new(); slapi_modify_internal_set_pb( mod_pb, dn, mods, 0, 0, - memberof_get_plugin_id(), 0); + memberof_get_plugin_id(), SLAPI_OP_FLAG_BYPASS_REFERRALS); slapi_modify_internal_pb(mod_pb); slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc); @@ -3282,7 +3282,7 @@ memberof_add_objectclass(char *auto_add_oc, const char *dn) slapi_modify_internal_set_pb( mod_pb, dn, mods, 0, 0, - memberof_get_plugin_id(), 0); + memberof_get_plugin_id(), SLAPI_OP_FLAG_BYPASS_REFERRALS); slapi_modify_internal_pb(mod_pb); slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc); -- 2.5.5