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

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
Note that each pre-operation and post-operation plug-in is associated with a
backend. Make sure that the
within the database section for that back-end in the server configuration file.
(The
directive should be added somewhere after the
plugin
directive.)
In Directory Server 6.x, add this to the end of the
located in the
<server_root>/slapd-<instance_id>/config
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
plugin
Chapter 8
Writing a Pre-Operation Bind Plug-in
directive to the end of
directory:
database
file, which is
dse.ldif
directory:
Defining Functions for Authentication
105

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.01

Table of Contents