Plug-in Programmer’s Guide Red Hat Directory Server |
Previous |
Contents |
Index |
Next |
Contents
Preface
- What You Should Already Know
- Using Directory Server Plug-in APIs
- Document Conventions
- Where to Find Directory Server Information
- Part 1 Introduction to Directory Server Plug-ins
An Overview of Directory Server Plug-ins
- What Are Directory Server Plug-ins?
- How Directory Server Plug-ins Work
- Calling Directory Server Plug-in Functions
- The Directory Server Architecture
- Types of Directory Server Plug-ins
Writing and Compiling Plug-ins
- Writing a Plug-in Function
- Including the API Header File
- Passing Data with Parameter Blocks
- Working with Parameter Blocks
- Getting Data from the Parameter Block
- Setting Data in the Parameter Block
- Calling Front-End Functions
- Plug-in Return Values
- Writing Plug-in Initialization Functions
- Specifying Directory Server Compatibility
- Specifying Information about the Plug-in
- Registering Your Plug-in Functions
- Returning a Value to the Directory Server
- Example of an Initialization Function
- Compiling a Directory Server Plug-in
Configuring Plug-ins
- Creating a Plug-in Configuration File
- Plug-in Dependencies
- Specific Plug-in Dependencies
- Plug-in Type Dependencies
- Specifying the Order of Plug-in Directives
- Summary of Plug-in Directives
- Loading the Plug-in Configuration File
- Passing Extra Arguments to Plug-ins
- Setting the Log Level of the Server
A Quick Example
- An Example Pre-Operation Plug-in
- Writing the Plug-in Example
- Compiling the Plug-in Example
- Registering the Plug-in Example
- Running the Plug-in Example
- Part 2 Basic Plug-in Programming Techniques
Front-End API Functions
- Logging Messages
- Adding Notes to Access Log Entries
- Sending Data to the Client
- Determining If an Operation Was Abandoned
- Working with Entries, Attributes, and Values
- Creating a New Entry
- Converting between Entries and Strings
- Getting and Setting the DN of an Entry
- Verifying Compliance with the Schema
- Getting the Attributes and Values of an Entry
- Iterating through the Attributes in an Entry
- Finding a Specific Attribute in an Entry
- Adding and Removing Values
- Working with DNs and RDNs
- Determining If a DN Is the Root DN
- Working with DN Suffixes
- Server Suffixes
- Getting the Parent DN of a DN
- Normalizing a DN
- Working with Search Filters
- Determining If an Entry Matches a Filter
- Getting the Filter Type
- Getting the Search Criteria
- Converting a String to a Filter
- Creating Complex Filters by Combining Filters
- Checking Passwords
Writing Pre/Post-Operation Plug-ins
- How Pre/Post-Operation Plug-ins Work
- Types of Pre-Operation and Post-Operation Functions
- Types of Pre-Operation Functions
- Types of Post-Operation Functions
- Registering Pre/Post-Operation Functions
Defining Functions for LDAP Operations
- Specifying Start and Close Functions
- Processing an LDAP Bind Operation
- Defining Functions for the Bind Operation
- Getting and Setting Parameters for the Bind Operation
- Processing an LDAP Unbind Operation
- Processing an LDAP Search Operation
- Getting the List of Candidates
- Iterating through Candidates
- Processing an LDAP Compare Operation
- Processing an LDAP Add Operation
- Processing an LDAP Modify Operation
- Processing an LDAP Modify RDN Operation
- Processing an LDAP Delete Operation
- Processing an LDAP Abandon Operation
Defining Functions for Authentication
- Understanding Authentication Methods
- How the Directory Server Identifies Clients
- How the Authentication Process Works
- Writing Your Own Authentication Plug-in
- Writing a Pre-Operation Bind Plug-in
- Defining Your Authentication Function
- Getting and Checking the Bind Parameters
- Getting the Entry and Checking the Credentials
- What to Do If Authentication Fails
- What to Do If Authentication Succeeds
- Registering the SASL Mechanism
- Example of a Pre-Operation Bind Plug-in
- Example of a Pre-Operation Bind Function
- Example of an Initialization Function
- Registering the Plug-in
- Using SASL with an LDAP Client
- Part 3 Advanced Programming Techniques
Writing Entry Store/Fetch Plug-ins
- How Entry Store/Fetch Plug-ins Work
- Writing Entry Store/Fetch Functions
- Registering Entry Store/Fetch Functions
Writing Extended Operation Plug-ins
- How Extended Operation Plug-ins Work
- Writing Extended Operation Functions
- Registering Extended Operation Functions
- Specifying Start and Close Functions
Writing Matching Rule Plug-ins
- Understanding Matching Rules
- Extensible Match Filters
- Extensible Match Filters in the Directory Server
- Understanding Matching Rule Plug-ins
- Functions Defined in Matching Rule Plug-ins
- How Matching Rules Are Identified
- How the Server Associates Plug-ins with OIDs
- Finding a Plug-in for Indexing
- Finding a Plug-in for Searching
- How the Server Uses Parameter Blocks
- Indexing Based on Matching Rules
- How the Server Sets Up the Index
- How the Server Updates the Index
- Writing the Indexer Factory Function
- Getting and Setting Parameters in Indexer Factory Functions
- Writing the Indexer Function
- Getting and Setting Parameters in Indexer Functions
- Handling Extensible Match Filters
- How the Server Handles the Filter
- Query Operators in Matching Rules
- Writing a Filter Factory Function
- Getting and Setting Parameters in Filter Factory Functions
- Writing a Filter Index Function
- Getting and Setting Parameters in Filter Index Functions
- Writing a Filter Matching Function
- Handling Sorting by Matching Rules
- Writing a Destructor Function
- Writing an Initialization Function
- Registering Matching Rule Functions
- Specifying Start and Close Functions
Using the Custom Distribution Logic
- About Distributing Flat Namespaces
- Creating a Distribution Function
- Adding the Distribution Function to Your Directory
- Adding Multiple Databases to a Single Suffix
- Using the Console
- From the Command-Line
- Adding Distribution Logic to a Suffix
- Using the Console
- From the Command-Line
- Using the Distribution Logic Examples
- Custom Distribution Checklist
Using Data Interoperability Plug-ins
- Installing Directory Server
- Understanding Deployment Configuration
- Installing Two Instances of Directory Server
- Enabling the DIOP Feature in Directory Server
- Using the DIOP Feature
- Sample DIOP Plug-in
- Debugging the Plug-in
- Plug-in API Reference
- Preserving the Default Behavior of the Server
- Bypassing Access Control Checks
- Part 4 Reference
Data Type and Structure Reference
- Summary of Data Types and Structures
- berval
- computed_attr_context
- LDAPControl
- LDAPMod
- mrFilterMatchFn
- plugin_referral_entry_callback
- plugin_result_callback
- plugin_search_entry_callback
- send_ldap_referral_fn_ptr_t
- send_ldap_result_fn_ptr_t
- send_ldap_search_entry_fn_ptr_t
- Slapi_Attr
- Slapi_Backend
- slapi_backend_state_change_fnptr
- Slapi_ComponentID
- slapi_compute_callback_t
- slapi_compute_output_t
- Slapi_Connection
- Slapi_CondVar
- Slapi_DN
- Slapi_Entry
- Slapi_Filter
- Slapi_MatchingRuleEntry
- Slapi_Mod
- Slapi_Mods
- Slapi_Mutex
- Slapi_Operation
- Slapi_PBlock
- Slapi_PluginDesc
- Slapi_RDN
- Slapi_UniqueID
- Slapi_Value
- Slapi_ValueSet
Function Reference
- Distribution Routines
- distribution_plugin_entry_point()
- Functions for Access Control
- slapi_access_allowed()
- slapi_acl_check_mods()
- slapi_acl_verify_aci_syntax()
- Functions for Internal Operations and Plug-in Callback
- slapi_add_internal_pb()
- slapi_delete_internal_pb()
- slapi_free_search_results_internal()
- slapi_modify_internal_pb()
- slapi_modrdn_internal_pb()
- slapi_search_internal_callback_pb()
- slapi_search_internal_get_entry()
- slapi_search_internal_pb()
- Functions for Setting Internal Operation Flags
- slapi_add_entry_internal_set_pb()
- slapi_add_internal_set_pb()
- slapi_delete_internal_set_pb()
- slapi_modify_internal_set_pb()
- slapi_rename_internal_set_pb()
- slapi_search_internal_set_pb()
- slapi_seq_internal_callback_pb()
- slapi_seq_internal_set_pb()
- Functions for Handling Attributes
- slapi_attr_add_value()
- slapi_attr_basetype()
- slapi_attr_dup()
- slapi_attr_first_value()
- slapi_attr_flag_is_set()
- slapi_attr_free()
- slapi_attr_get_bervals_copy()
- slapi_attr_get_flags()
- slapi_attr_get_numvalues()
- slapi_attr_get_oid_copy()
- slapi_attr_get_type()
- slapi_attr_get_valueset()
- slapi_attr_init()
- slapi_attr_new()
- slapi_attr_next_value()
- slapi_attr_set_valueset()
- slapi_attr_syntax_normalize()
- slapi_attr_type2plugin()
- slapi_attr_type_cmp()
- slapi_attr_types_equivalent()
- slapi_attr_value_cmp()
- slapi_attr_value_find()
- slapi_valueset_set_from_smod()
- Functions for Managing Backend Operations
- slapi_be_addsuffix()
- slapi_be_delete_onexit()
- slapi_be_exist()
- slapi_be_free()
- slapi_be_get_instance_info()
- slapi_be_get_name()
- slapi_be_get_readonly()
- slapi_be_getentrypoint()
- slapi_be_getsuffix()
- slapi_be_gettype()
- slapi_be_is_flag_set()
- slapi_be_issuffix()
- slapi_be_logchanges()
- slapi_be_new()
- slapi_be_private()
- slapi_be_select()
- slapi_be_select_by_instance_name()
- slapi_be_set_flag()
- slapi_be_set_instance_info()
- slapi_be_set_readonly()
- slapi_be_setentrypoint()
- slapi_get_first_backend()
- slapi_get_first_suffix()
- slapi_get_next_backend()
- slapi_get_next_suffix()
- slapi_is_root_suffix()
- slapi_register_backend_state_change()
- slapi_unregister_backend_state_change()
- Functions for Dealing with Controls
- slapi_build_control()
- slapi_build_control_from_berval()
- slapi_control_present()
- slapi_dup_control()
- slapi_get_supported_controls_copy()
- slapi_register_supported_control()
- Functions for Syntax Plug-in
- slapi_call_syntax_assertion2keys_ava_sv()
- slapi_call_syntax_assertion2keys_sub_sv()
- slapi_call_syntax_values2keys_sv()
- Functions for Managing Memory
- slapi_ch_array_free()
- slapi_ch_bvdup()
- slapi_ch_bvecdup()
- slapi_ch_calloc()
- slapi_ch_free()
- slapi_ch_free_string()
- slapi_ch_malloc()
- slapi_ch_realloc()
- slapi_ch_smprintf()
- slapi_ch_strdup()
- Functions for Managing DNs
- slapi_add_auth_response_control()
- slapi_dn_beparent()
- slapi_dn_ignore_case()
- slapi_dn_isbesuffix()
- slapi_dn_isparent()
- slapi_dn_isroot()
- slapi_dn_issuffix()
- slapi_dn_normalize()
- slapi_dn_normalize_case()
- slapi_dn_normalize_to_end()
- slapi_dn_parent()
- slapi_dn_plus_rdn()
- slapi_rdn2typeval()
- Functions for Managing Entries
- slapi_entry2str()
- slapi_entry2str_with_options()
- slapi_entry_add_rdn_values()
- slapi_entry_add_string()
- slapi_entry_add_value()
- slapi_entry_add_values_sv()
- slapi_entry_add_valueset()
- slapi_entry_alloc()
- slapi_entry_attr_delete()
- slapi_entry_attr_find()
- slapi_entry_attr_get_bool()
- slapi_entry_attr_get_charptr()
- slapi_entry_attr_get_charray()
- slapi_entry_attr_get_int()
- slapi_entry_attr_get_long()
- slapi_entry_attr_get_uint()
- slapi_entry_attr_get_ulong()
- slapi_entry_attr_has_syntax_value()
- slapi_entry_attr_merge_sv()
- slapi_entry_attr_replace_sv()
- slapi_entry_attr_set_charptr()
- slapi_entry_attr_set_int()
- slapi_entry_attr_set_long()
- slapi_entry_attr_set_uint()
- slapi_entry_attr_set_ulong()
- slapi_entry_delete_string()
- slapi_entry_delete_values_sv()
- slapi_entry_dup()
- slapi_entry_first_attr()
- slapi_entry_free()
- slapi_entry_get_dn()
- slapi_entry_get_dn_const()
- slapi_entry_get_ndn()
- slapi_entry_get_sdn()
- slapi_entry_get_sdn_const()
- slapi_entry_get_uniqueid()
- slapi_entry_has_children()
- slapi_entry_init()
- slapi_entry_merge_values_sv()
- slapi_entry_next_attr()
- slapi_entry_rdn_values_present()
- slapi_entry_schema_check()
- slapi_entry_set_dn()
- slapi_entry_set_sdn()
- slapi_entry_set_uniqueid()
- slapi_entry_size()
- slapi_is_rootdse()
- slapi_str2entry()
- Functions Related to Entry Flags
- slapi_entry_clear_flag()
- slapi_entry_flag_is_set()
- slapi_entry_set_flag()
- Functions for Dealing with Filters
- slapi_filter_apply()
- slapi_filter_compare()
- slapi_filter_dup()
- slapi_filter_free()
- slapi_filter_get_attribute_type()
- slapi_filter_get_ava()
- slapi_filter_get_choice()
- slapi_filter_get_subfilt()
- slapi_filter_get_type()
- slapi_filter_join()
- slapi_filter_join_ex()
- slapi_filter_list_first()
- slapi_filter_list_next()
- slapi_filter_test()
- slapi_filter_test_ext()
- slapi_filter_test_simple()
- slapi_find_matching_paren()
- slapi_str2filter()
- slapi_vattr_filter_test()
- Functions Specific to Extended Operation
- slapi_get_supported_extended_ops_copy()
- Functions Specific to Bind Methods
- slapi_get_supported_saslmechanisms_copy()
- slapi_register_supported_saslmechanism()
- Functions for Thread-Safe LDAP Connections
- slapi_ldap_init()
- slapi_ldap_unbind()
- Functions for Logging
- slapi_log_error()
- slapi_is_loglevel_set()
- Functions for Handling Matching Rules
- slapi_berval_cmp()
- slapi_matchingrule_free()
- slapi_matchingrule_get()
- slapi_matchingrule_new()
- slapi_matchingrule_register()
- slapi_matchingrule_set()
- slapi_matchingrule_unregister()
- slapi_mr_filter_index()
- slapi_mr_indexer_create()
- Functions for LDAPMod Manipulation
- slapi_entry2mods()
- slapi_mod_add_value()
- slapi_mod_done()
- slapi_mod_dump()
- slapi_mod_free()
- slapi_mod_get_first_value()
- slapi_mod_get_ldapmod_byref()
- slapi_mod_get_ldapmod_passout()
- slapi_mod_get_next_value()
- slapi_mod_get_num_values()
- slapi_mod_get_operation()
- slapi_mod_get_type()
- slapi_mod_init()
- slapi_mod_init_byref()
- slapi_mod_init_byval()
- slapi_mod_init_passin()
- slapi_mod_isvalid()
- slapi_mod_new()
- slapi_mod_remove_value()
- slapi_mod_set_operation()
- slapi_mod_set_type()
- slapi_mods2entry()
- slapi_mods_add()
- slapi_mods_add_ldapmod()
- slapi_mods_add_mod_values()
- slapi_mods_add_smod()
- slapi_mods_add_modbvps()
- slapi_mods_add_string()
- slapi_mods_done()
- slapi_mods_dump()
- slapi_mods_free()
- slapi_mods_get_first_mod()
- slapi_mods_get_first_smod()
- slapi_mods_get_ldapmods_byref()
- slapi_mods_get_ldapmods_passout()
- slapi_mods_get_next_mod()
- slapi_mods_get_next_smod()
- slapi_mods_get_num_mods()
- slapi_mods_init()
- slapi_mods_init_byref()
- slapi_mods_init_passin()
- slapi_mods_insert_after()
- slapi_mods_insert_at()
- slapi_mods_insert_before()