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 \
arg1 arg2
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, in Directory Server version 6.1 onwards, plug-ins must not start up in
the
init
of 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
is an
is an array of
function. They must start up in the start function. The preferred method
that specifies the number of additional
int
that specifies each additional
char*
file). Two examples are shown below:
dse.ldif
Passing Extra Arguments to Plug-Ins
Chapter 3
Configuring Plug-Ins
45
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.2 - PLUG-IN and is the answer not in the manual?
Questions and answers