Passing Extra Arguments to Plug-ins
In the Directory Server 4.x version, you could specify additional arguments at the
end of the
plugin preoperation /usr/lib/myplugin.so my_init_fn \
From the initialization function and the plug-in functions, you can get these
arguments by getting the following parameters from the parameter block.
•
SLAPI_PLUGIN_ARGC
arguments in the directive.
•
SLAPI_PLUGIN_ARGV
argument in the directive.
However, plug-ins in later releases of Directory Server must not start up in the
init
communicating plug-in specific configuration is through custom attribute-value
pairs in the plug-in entry (in the
Example 1:
dn: cn=Test ExtendedOp,cn=plugins,cn=config
objectClass: top
objectClass: nsSlapdPlugin
objectClass: extensibleObject
cn: Test ExtendedOp
nsslapd-pluginPath: /usr/netscape/servers/plugins/slapd/slapi/
examples/libtest-plugin.so
nsslapd-pluginInitfunc: testexop_init
nsslapd-pluginType: extendedop
nsslapd-pluginEnabled: on
nsslapd-plugin-depends-on-type: database
nsslapd-pluginId: test-extendedop
nsslapd-pluginarg0: 1.2.3.4
Example 2:
dn: cn=Internationalization Plugin,cn=plugins,cn=config
objectClass: top
objectClass: nsSlapdPlugin
objectClass: extensibleObject
cn: Internationalization Plugin
nsslapd-pluginPath: d:/netscape/servers/lib/liblcoll.dll
nsslapd-pluginInitfunc: orderingRule_init
nsslapd-pluginType: matchingRule
nsslapd-pluginEnabled: on
directive. For example:
plugin
arg1 arg2
is an
is an array of
function. They must start up in the
that specifies the number of additional
int
that specifies each additional
char*
function. The preferred method of
start
file). Two examples are shown below:
dse.ldif
Passing Extra Arguments to Plug-ins
Chapter 3
Configuring Plug-ins
55
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 7.0 - PLUG-IN and is the answer not in the manual?
Questions and answers