Skip Navigation Links | |
Exit Print View | |
Oracle Directory Server Enterprise Edition Developer's Guide 11 g Release 1 (11.1.1.5.0) |
Part I Directory Server Plug-In API Guide
1. Before You Start Writing Plug-Ins
2. Changes to the Plug-In API Since Directory Server 5.2
3. Getting Started With Directory Server Plug-Ins
Updating Directory Server Configuration
Writing Directory Server Plug-Ins
Include the slapi-plugin.h Header File
Write an Initialization Function
Set Configuration Information Through the Parameter Block
Specifying the Plug-In Description
Set Pointers to Functions Through the Parameter Block
Building Directory Server Plug-Ins
Include the Header File for the Plug-In API
Plugging Libraries Into Directory Server
Specify Plug-In Configuration Settings
Understanding Plug-In Types and Dependencies
Retrieving Arguments Passed to Plug-Ins
Modify the Directory Server Configuration
Log Three Levels of Message Severity
Set the Appropriate Log Level in the Directory Server Configuration
4. Working With Entries Using Plug-Ins
5. Extending Client Request Handling Using Plug-Ins
6. Handling Authentication Using Plug-Ins
7. Performing Internal Operations With Plug-Ins
8. Writing Entry Store and Entry Fetch Plug-Ins
9. Writing Extended Operation Plug-Ins
10. Writing Matching Rule Plug-Ins
11. Writing Password Storage Scheme Plug-Ins
12. Writing Password Quality Check Plug-Ins
13. Writing Computed Attribute Plug-Ins
Part II Directory Server Plug-In API Reference
14. Data Type and Structure Reference
15. Function Reference, Part I
16. Function Reference, Part II
This section explains how to build plug-in binaries. This section deals with compilation requirements and with linking requirements for Directory Server plug-ins.
The compiler needs to be able to locate the header files such as slapi-plugin.h. Find header files in install-path/include/.
Link plug-ins so the plug-in library is reentrant and portable and can be shared. The following example shows one way of building a plug-in library. The example works with the compiler that is used with a 64-bit Directory Server running on Solaris platforms.
Example 3-2 64-bit: Makefile for a Solaris Sample Plug-In Library
INCLUDE_FLAGS = -I../include CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -KPIC -xarch=v9 -DUSE_64 LDFLAGS = -G DIR64 = 64 OBJS = dns.o entries.o hello.o internal.o testpwdstore.o \ testsaslbind.o testextendedop.o testpreop.o testpostop.o \ testentry.o testbind.o testgetip.o all: MKDIR64 $(DIR64)/libtest-plugin.so MKDIR64: @if [ ! -d $(DIR64) ]; then mkdir $(DIR64); fi $(DIR64)/libtest-plugin.so: $(OBJS) $(LD) $(LDFLAGS) -o $@ $(OBJS) .c.o: $(CC) $(CFLAGS) -c $< clean: -rm -f $(OBJS) libtest-plugin.so $(DIR64)/libtest-plugin.so
The CFLAGS -xarch=v9 and -DUSE_64 specify that the compiler builds the library for use with a 64-bit server. Notice also that the 64-bit library is placed in a directory that is named 64/. This extra directory is required for 64-bit plug-ins. A 64-bit server adds the name of the extra directory to the path name when searching for the library. Refer to Searching Plug-In Libraries for further information.
The following example shows a 32-bit equivalent of the Makefile.
Example 3-3 32-bit: Makefile for a Solaris Sample Plug-In Library
INCLUDE_FLAGS = -I../include CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -KPIC LDFLAGS = -G OBJS = dns.o entries.o hello.o internal.o testpwdstore.o \ testsaslbind.o testextendedop.o testpreop.o testpostop.o \ testentry.o testbind.o testgetip.o all: libtest-plugin.so libtest-plugin.so: $(OBJS) $(LD) $(LDFLAGS) -o $@ $(OBJS) .c.o: $(CC) $(CFLAGS) -c $< clean: -rm -f $(OBJS) libtest-plugin.so
Notice that both 32-bit versions and 64-bit versions of the plug-in library can coexist on the same host.
Build rules are in install-path/examples/. The rules are also in install-path/examples/Makefile64. Refer to these files for the recommended setup for compiling and linking on your platform.