From 7f8c64fb4bb4b0de68272a3908ae4d07afdba49c Mon Sep 17 00:00:00 2001 From: William Brown Date: Jun 08 2016 22:29:06 +0000 Subject: 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: nhosoi, tbordaz (Thanks, and sorry for breaking it ...) --- 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; } } }