diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2009-08-31 08:51:03 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2009-08-31 08:51:03 -0700 |
commit | 6b08e5b7953dd87e6f4ad92df04d93e670d6d052 (patch) | |
tree | d9f2c59760b0ebc7c549372cf9911a21393430f8 /ldap/servers/slapd/slapi-plugin.h | |
parent | 177f772ec3d596028eb2a633f3ed360186df42fc (diff) | |
download | ds-6b08e5b7953dd87e6f4ad92df04d93e670d6d052.tar.gz ds-6b08e5b7953dd87e6f4ad92df04d93e670d6d052.tar.xz ds-6b08e5b7953dd87e6f4ad92df04d93e670d6d052.zip |
Plugin Default Config Entry
Design doc:
http://directory.fedoraproject.org/wiki/Entry_USN#Plugin_Default_Config_Entr
New slapi APIs in libslapd:
int slapi_set_plugin_default_config(const char *type, Slapi_Value *value);
Description: Add given "type: value" to the plugin default config entry
(cn=plugin default config,cn=config) unless the same "type:
value" pair already exists in the entry.
Parameters: type - Attribute type to add to the default config entry
value - 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, Slapi_ValueSet **valueset);
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
valueset - Valueset holding the attribute values
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:
1) usn_start calls slapi_set_plugin_default_config to add "entryusn" to
the EXCLUDE list of the value of nsds5ReplicatedAttributeList in the
plugin default config entry.
2) fix for the bug 518673 - entryusn: wrong lastusn value; When the entryusn
is not assigned yet, the next value to be set is 0. Lastusn is calculate
as (the next entryusn - 1). Although the entryusn is 64-bit unsigned
long, it should be printed as a 64-bit signed integer for lastusn.
Other:
Fixed a compiler error in ldap/servers/slapd/dse.c.
Diffstat (limited to 'ldap/servers/slapd/slapi-plugin.h')
-rw-r--r-- | ldap/servers/slapd/slapi-plugin.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h index e59df68b..75a2ddc2 100644 --- a/ldap/servers/slapd/slapi-plugin.h +++ b/ldap/servers/slapd/slapi-plugin.h @@ -3637,6 +3637,29 @@ char **slapi_str2charray_ext( char *str, char *brkstr, int allow_dups ); #endif #endif +/** + * Set given "type: value" to the plugin default config entry + * (cn=plugin default config,cn=config) unless the same "type: value" pair + * already exists in the entry. + * + * \param type Attribute type to add to the default config entry + * \param value Attribute value to add to the default config entry + * \return 0 if the operation was successful + * \return non-0 if the operation was not successful + */ +int slapi_set_plugin_default_config(const char *type, Slapi_Value *value); + +/** + * Get attribute values of given type from the plugin default config entry + * (cn=plugin default config,cn=config). + * + * \param type Attribute type to get from the default config entry + * \param valueset Valueset holding the attribute values + * \return 0 if the operation was successful + * \return non-0 if the operation was not successful + * \warning Caller is responsible to free attrs by slapi_ch_array_free + * */ +int slapi_get_plugin_default_config(char *type, Slapi_ValueSet **valueset); #ifdef __cplusplus } |