[Fedora-directory-commits] ldapserver/ldap/servers/slapd mapping_tree.c, 1.9, 1.10

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Aug 23 20:52:15 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27789/ldapserver/ldap/servers/slapd

Modified Files:
	mapping_tree.c 
Log Message:
Resolves: bug 252263
Bug Description: enabling chain-on-update causes replica to act as a master
Reviewed by: nkinder (Thanks!)
Fix Description: This fix is only minor - we must use sym_load() to look up plugins, including the entry distribution plugin we use for chain on update.  But I don't believe this was causing the problem.  Chain on update does not work if you BIND as directory manager.  You must bind as a regular user.  It may be difficult to change this.  We need to do more testing to see if, in general, proxy BIND and operations work with directory manager.  The chaining backend cannot use directory manager as the proxy user.
Platforms tested: RHEL5
Flag Day: no
Doc impact: Yes, we need to make sure we document exactly how chain on update is to be used.



Index: mapping_tree.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mapping_tree.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mapping_tree.c	15 Mar 2007 18:21:37 -0000	1.9
+++ mapping_tree.c	23 Aug 2007 20:52:13 -0000	1.10
@@ -792,18 +792,8 @@
 
     if (plugin_lib && plugin_funct)
     {
-        PRLibrary *lib = PR_LoadLibrary(plugin_lib);
-        if (lib)
-        { 
-            plugin = (mtn_distrib_fct) PR_FindSymbol(lib, plugin_funct);
-        }
-        else
-        {
-            LDAPDebug(LDAP_DEBUG_ANY, "ERROR: can't load plugin lib %s. "
-            SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
-            plugin_lib, PR_GetError(), slapd_pr_strerror(PR_GetError()));
-        }
-
+        plugin = (mtn_distrib_fct)sym_load(plugin_lib, plugin_funct,
+                                           "Entry Distribution", 1);
         if (plugin == NULL)
         {
             LDAPDebug(LDAP_DEBUG_ANY,
@@ -1315,9 +1305,7 @@
     {
         if (plugin_lib && plugin_fct)
         {
-            PRLibrary *lib = PR_LoadLibrary(plugin_lib);
-            if (lib) 
-                plugin = (mtn_distrib_fct) PR_FindSymbol(lib, plugin_fct);
+            plugin = (mtn_distrib_fct) sym_load(plugin_lib, plugin_fct, "Entry Distribution", 1);
 
             if (plugin == NULL)
             {




More information about the Fedora-directory-commits mailing list