Description of problem: The nsslapd-distribution-plugin should not require the plugin name to begin with "lib". Example: "standard_distrib_plugin_Linux.so" will result in failure to load the plugin and the following in the errors log: 13/Nov/2009:09:51:09 -0500] - Netscape Portable Runtime error -5977: /usr//dirsrv/plugins/standard_distrib_plugin_Linux.so: cannot open shared object file: No such file or directory [13/Nov/2009:09:51:09 -0500] - Could not open library "/usr//dirsrv/plugins/standard_distrib_plugin_Linux.so" for plugin Entry Distribution [13/Nov/2009:09:51:09 -0500] - ERROR: node cn="o=my_suffix.com",cn=mapping tree,cn=config cannot find distribution plugin. Netscape Portable Runtime -5977 (Failure to load dynamic library.) Version-Release number of selected component (if applicable): DS 9.0 How reproducible: Steps to Reproduce: 1. place the plugin in /usr/lib<64>/dirsrv/plugins 2. Add the following: dn: cn=BE_1,cn=ldbm database,cn=plugins,cn=config objectclass: top objectclass: extensibleObject objectclass: nsBackendInstance cn: BE_1 nsslapd-suffix: o=my_suffix.com dn: cn=BE_2,cn=ldbm database,cn=plugins,cn=config objectclass: top objectclass: extensibleObject objectclass: nsBackendInstance cn: BE_2 nsslapd-suffix: o=my_suffix.com dn: cn=BE_3,cn=ldbm database,cn=plugins,cn=config objectclass: top objectclass: extensibleObject objectclass: nsBackendInstance cn: BE_3 nsslapd-suffix: o=my_suffix.com dn: cn="o=my_suffix.com",cn=mapping tree,cn=config objectclass: top objectclass: extensibleObject objectclass: nsMappingTree cn: "o=my_suffix.com" nsslapd-state: backend nsslapd-backend: BE_1 nsslapd-backend: BE_2 nsslapd-backend: BE_3 nsslapd-distribution-plugin: standard_distrib_plugin_Linux.so nsslapd-distribution-funct: alpha_distribution 3. check the errors log 4. renaming the library to libstandard_distrib_plugin_Linux.so , will resolve the problem. Actual results: Expected results: Additional info:
*** Bug 537234 has been marked as a duplicate of this bug. ***
Created attachment 386889 [details] patch
Comment on attachment 386889 [details] patch ack.
To ssh://git.fedorahosted.org/git/389/ds.git 73fdd3b..62d9674 master -> master commit 62d967419616d77891c78e4ee3553482cbea1c17 Author: Rich Megginson <rmeggins> Date: Tue Jan 26 11:15:18 2010 -0700 Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: We use the function PL_GetLibraryName from NSPR to get the platform specific DLL/shared lib filename suffix. Unfortunately, this funct also prepends the string "lib" to the given name if the given file has no suffix. If the given name already has the correct suffix, it does not prepe the "lib" to the name. get_plugin_name() should look for the original library name in the string returned by PL_GetLibraryName. If it is there, a has something before it in the string, see if it is "/lib" - if so, remove t extraneous "lib" string. If "/lib" is not there, then just pass the string through as is. To summarize: /full/path/to/name.so -> /full/path/to/name.so - error if /full/path/to/name name -> /default/plugin/path/libname.so -> /default/plugin/path/name.so name.so -> /default/plugin/path/name.so Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
verfied - RHEL 4 version: redhat-ds-base-8.2.0-2010053104.el4dsrv plugin loaded correctly - no errors # dc\3Dexample\2Cdc\3Dcom, mapping tree, config dn: cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config objectClass: top objectClass: extensibleObject objectClass: nsMappingTree cn: dc=example,dc=com cn: "dc=example,dc=com" nsslapd-state: backend nsslapd-backend: userRoot nsslapd-backend: BE_1 nsslapd-backend: BE_2 nsslapd-backend: BE_3 nsslapd-distribution-plugin: standard_distrib_plugin_Linux.so nsslapd-distribution-funct: alpha_distribution