summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/mapping_tree.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-08-23 20:52:13 +0000
committerRich Megginson <rmeggins@redhat.com>2007-08-23 20:52:13 +0000
commitd48891ad98082bce4358fa0b143b85ec6ff06ac6 (patch)
treed658369729f4b7c42793268e6f692212076e4d30 /ldap/servers/slapd/mapping_tree.c
parenta4118d7929ad2d215640668968132881a869eda7 (diff)
downloadds-d48891ad98082bce4358fa0b143b85ec6ff06ac6.tar.gz
ds-d48891ad98082bce4358fa0b143b85ec6ff06ac6.tar.xz
ds-d48891ad98082bce4358fa0b143b85ec6ff06ac6.zip
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.
Diffstat (limited to 'ldap/servers/slapd/mapping_tree.c')
-rw-r--r--ldap/servers/slapd/mapping_tree.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c
index 3947dd60..f2d4abdd 100644
--- a/ldap/servers/slapd/mapping_tree.c
+++ b/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)
{