Registering The Plug-In - Netscape DIRECTORY SERVER 7.0 - PLUG-IN Manual

For plug-in
Table of Contents

Advertisement

Code Example 8-2
/* Register the pre-operation bind function and specify
the server plug-in version. */
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
SLAPI_PLUGIN_VERSION_01 ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&bindpdesc ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_BIND_FN,
(void *) test_bind ) != 0 ) {
slapi_log_error( SLAPI_LOG_PLUGIN, "testbind_init",
"Failed to set version and function\n" );
return( -1 );
}
return( 0 );
}

Registering the Plug-in

To register the plug-in, follow the instructions appropriate for the Directory Server
you're using:
In Directory Server 4.x, add the
the
slapd.ldbm.conf
<server_root>/slapd-<instance_id>/config
plugin preoperation on "my preop plugin"
/<server_root>/plugins/slapd/slapi/examples/libtest-plugin.so
testauth_init
Each pre-operation and post-operation plug-in is associated with a backend.
Make sure that the
database section for that back-end in the server configuration file. (The
directive should be added somewhere after the
In current versions of Directory Server, add this to the end of the
file, which is located in the
directory:
dn: cn=Test Bind,cn=plugins,cn=config
objectClass: top
objectClass: nsSlapdPlugin
objectClass: extensibleObject
cn: Test Bind
nsslapd-pluginPath:
<server_root>/plugins/slapd/slapi/examples/libtest-plugin.so
nsslapd-pluginInitfunc: testbind_init
Sample Function for Registering Pre-Operation Bind Function
plugin preoperation
file, which is located in the
directive that registers the plug-in is within the
plugin
<server_root>/slapd-<instance_id>/config
Chapter 8
Writing a Pre-Operation Bind Plug-in
directive to the end of
directory:
directive.)
database
dse.ldif
Defining Functions for Authentication
plugin
115

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netscape directory server 7.0

Table of Contents