From e9947984ba386496fda69ab24a3d01fb2969395e Mon Sep 17 00:00:00 2001 From: William Brown Date: Wed, 8 Jun 2016 09:29:05 +1000 Subject: [PATCH] Ticket 48870 - Correct plugin execution order due to changes in exop Bug Description: Due to changes to make exop handling more efficient, an issue was introduced where the execution of plugins was re-ordered. This meant the precedence rules when two plugins are equal, were not the same. Fix Description: Return early when we find the plugin, rather than continuing to loop to find the "last match" https://fedorahosted.org/389/ticket/48870 Author: wibrown Review by: ??? --- ldap/servers/slapd/plugin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c index a2b2d75..440be98 100644 --- a/ldap/servers/slapd/plugin.c +++ b/ldap/servers/slapd/plugin.c @@ -504,7 +504,13 @@ plugin_determine_exop_plugins( const char *oid, struct slapdplugin **plugin) if ( strcasecmp( oid, p->plg_exoids[i] ) == 0 ) { *plugin = p; rc = p->plg_type; - break; + /* break; */ + /* WB - 48870, return early so that we can get the plugin + * that is set earlier in the list. This prevents the + * need to change add_plugin_to_list, which may have + * side effects. + */ + return rc; } } } -- 2.5.5