6.3. Using Plug-in Configuration Information in Preop Plug-ins

A plug-in may need to access its configuration data to use as part of the initialization function. For example, a plug-in may specify a specific port to use to connect to the Directory Server for some operation, and that port number is set in the plug-in's configuration entry.
However, since the plug-in is not initialized yet, there is no SLAPI_TARGET_DN set yet. The plug-in can retrieve its own configuration using the SLAPI_PLUGIN_CONFIG_ENTRY pblock parameter.
int
my_plugin_init(Slapi_PBlock *pb)
{
	Slapi_Entry *my_config_entry = NULL;
	slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &my_config_entry);
The plug-in must not free the Slapi_Entry* returned with SLAPI_PLUGIN_CONFIG_ENTRY, and any changes made to this entry may be lost or ignored. Rhe Slapi_Entry* structure should be read-only and used only to get plug-in configuration parameters as attributes of the entry.
Use the internal slapi_modify_internal* SLAPI functions to modify the returned entry.