diff options
author | Rich Megginson <rmeggins@redhat.com> | 2009-01-09 21:30:56 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2009-01-09 21:30:56 +0000 |
commit | 962ec2010e44a85088038ebf1f1e393baf49796d (patch) | |
tree | b7e824044ec9a52ebd3187dcdb8c68adb14a4341 /ldap/servers/slapd/slapi-plugin.h | |
parent | 9697d3a48d78cf81251487efa2d647d7f61539d6 (diff) | |
download | ds-962ec2010e44a85088038ebf1f1e393baf49796d.tar.gz ds-962ec2010e44a85088038ebf1f1e393baf49796d.tar.xz ds-962ec2010e44a85088038ebf1f1e393baf49796d.zip |
Resolves: bug 471068
Bug Description: winsync doesn't recognize some changes
Reviewed by: nkinder (Thanks!)
Fix Description: Before sending updates to AD, first check to see if the updates still apply. For modify/add operations, check to make sure the value to add doesn't exist. If it does, remove it from the list of values in the mod. If all values are removed, then just skip the modify/add op altogether. For modify/del ops, check to see if the attribute exists. If not, just skip the op. If it does exist, check to see if the values exist, and remove the values from the mod/del op that do not exist anymore. If all values have been removed, just skip the mod/del op.
I added a new slapi function - slapi_mod_init_valueset_byval - which will init a Slapi_Mod and init the list of values using a valueset. Fortunately there was already a function for converting a Slapi_Value** to a berval**.
I also fixed a few compiler warnings.
Platforms tested: RHEL5
Flag Day: no
Doc impact: yes - add new function to slapi docs
Diffstat (limited to 'ldap/servers/slapd/slapi-plugin.h')
-rw-r--r-- | ldap/servers/slapd/slapi-plugin.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h index 5ffb8608..87d8cd6e 100644 --- a/ldap/servers/slapd/slapi-plugin.h +++ b/ldap/servers/slapd/slapi-plugin.h @@ -573,6 +573,8 @@ void slapi_mod_init(Slapi_Mod *smod, int initCount); void slapi_mod_init_byval(Slapi_Mod *smod, const LDAPMod *mod); void slapi_mod_init_byref(Slapi_Mod *smod, LDAPMod *mod); void slapi_mod_init_passin(Slapi_Mod *smod, LDAPMod *mod); +/* init a mod and set the mod values to be a copy of the given valueset */ +void slapi_mod_init_valueset_byval(Slapi_Mod *smod, int op, const char *type, const Slapi_ValueSet *svs); void slapi_mod_add_value(Slapi_Mod *smod, const struct berval *val); void slapi_mod_remove_value(Slapi_Mod *smod); struct berval *slapi_mod_get_first_value(Slapi_Mod *smod); |