Browse Source

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.

Rich Megginson 18 years ago
parent
commit
d48891ad98
1 changed files with 3 additions and 15 deletions
  1. 3 15
      ldap/servers/slapd/mapping_tree.c

+ 3 - 15
ldap/servers/slapd/mapping_tree.c

@@ -792,18 +792,8 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node **newnodep )
 
     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 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
     {
         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)
             {