[389-devel] Please review: Plugin Default Config Entry

Noriko Hosoi nhosoi at redhat.com
Tue Aug 25 22:32:49 UTC 2009


Plugin Default Config Entry

Design doc:
http://directory.fedoraproject.org/wiki/Entry_USN#Plugin_Default_Config_Entry

New slapi APIs in libslapd:
   int slapi_set_plugin_default_config(char *type, char *attr);
   Description: Set given "type: attr" to the plugin default config entry
                (cn=plugin default config,cn=config).
   Parameters: type - Attribute type to add to the default config entry
               attr - Attribute value to add to the default config entry
   Return Value: 0 if the operation was successful
                 non-0 if the operation was not successful

   int slapi_get_plugin_default_config(char *type, char ***attrs);
   Description: Get attribute values of given type from the plugin default
                config entry (cn=plugin default config,cn=config).
   Parameters: type - Attribute type to get from the default config entry
               attrs - Pointer to the string array to store the values of
                       the attribute
   Return Value: 0 if the operation was successful
               non-0 if the operation was not successful
   warning: Caller is responsible to free attrs by slapi_ch_array_free

Changes in the Replication plugin:
1) Functions to set replicated attributes
        agmt_set_replicated_attributes_from_attr and
        agmt_set_replicated_attributes_from_entry
    call _agmt_set_default_fractional_attrs to sets the default excluded
    attribute list from the plugin default config entry before setting
    them from each replication agreement.
    To support it, agmt_parse_excluded_attrs_config_attr is changed to be
    re-entrant.
2) Fixed a minor memory leak in the fractional attributes (ra->frac_attrs).
3) Added a check for the duplicated fractional attributes.

Changes in the USN plugin:
usn_start calls slapi_get_plugin_default_config to check if "entryusn" is
in the EXCLUDE list of the value of nsds5ReplicatedAttributeList in the
plugin default config entry or not.  If it does not exist, the function
adds it.  Note: If the nsds5ReplicatedAttributeList value exists and
"entryusn" is not in the EXCLUDE list, we have to append it to the list
instead of replacing it.

Thanks,
--noriko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Plugin-Default-Config-Entry.patch
Type: text/x-patch
Size: 23905 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090825/97c17b7a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3250 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090825/97c17b7a/attachment.p7s>


More information about the Fedora-directory-devel mailing list