This is an automated email from the git hooks/post-receive script.
lkrispen pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
commit 9597dddc0169032c12b381a09657c11f6bf883be
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
AuthorDate: Thu Sep 12 13:42:39 2019 +0200
Issue 50506 - Fix regression for relication stripattrs
Bug: When parsing the provided attribute value, a reference was used
and modified, the original attribute was corrupted
Fix: Use a copy for parsing
Reviewed by: ?
---
ldap/servers/plugins/replication/repl5_agmt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/plugins/replication/repl5_agmt.c
b/ldap/servers/plugins/replication/repl5_agmt.c
index f2f16f5..2948270 100644
--- a/ldap/servers/plugins/replication/repl5_agmt.c
+++ b/ldap/servers/plugins/replication/repl5_agmt.c
@@ -530,9 +530,10 @@ agmt_new_from_entry(Slapi_Entry *e)
* Extract the attributes to strip for "empty" mods
*/
ra->attrs_to_strip = NULL;
- tmpstr = (char *)slapi_entry_attr_get_ref(e, type_nsds5ReplicaStripAttrs);
+ tmpstr = slapi_entry_attr_get_charptr(e, type_nsds5ReplicaStripAttrs);
if (NULL != tmpstr) {
ra->attrs_to_strip = slapi_str2charray_ext(tmpstr, " ", 0);
+ slapi_ch_free_string(&tmpstr);
}
if (!agmt_is_valid(ra)) {
@@ -2954,7 +2955,7 @@ agmt_set_attrs_to_strip(Repl_Agmt *ra, Slapi_Entry *e)
{
char *tmpstr = NULL;
- tmpstr = (char *)slapi_entry_attr_get_ref(e, type_nsds5ReplicaStripAttrs);
+ tmpstr = slapi_entry_attr_get_charptr(e, type_nsds5ReplicaStripAttrs);
PR_Lock(ra->lock);
if (ra->attrs_to_strip) {
@@ -2964,6 +2965,7 @@ agmt_set_attrs_to_strip(Repl_Agmt *ra, Slapi_Entry *e)
ra->attrs_to_strip = NULL;
} else {
ra->attrs_to_strip = slapi_str2charray_ext(tmpstr, " ", 0);
+ slapi_ch_free_string(&tmpstr);
}
PR_Unlock(ra->lock);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date