Wednesday, June 8, 2016

[389-commits] ldap/servers

ldap/servers/slapd/plugin.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 7f8c64fb4bb4b0de68272a3908ae4d07afdba49c
Author: William Brown <firstyear@redhat.com>
Date: Wed Jun 8 09:29:05 2016 +1000

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;
}
}
}

_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org

No comments:

Post a Comment