ldap/servers/plugins/replication/windows_protocol_util.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit b4a09b602425074810618d9564cf0145f07b79c6
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Mar 23 20:16:37 2012 -0600
Ticket #324 - redux: Sync with group attribute containing () fails
https://fedorahosted.org/389/ticket/324
Resolves: Ticket #324
Bug Description: Sync with group attribute containing () fails
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Previous fix broke cases that did not need escaping. Have
to use the return value of escape_filter_value() rather than use the buffer
passed to that function. If the value doesn't need escaping, the original
value is returned, and the buffer is empty.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c
b/ldap/servers/plugins/replication/windows_protocol_util.c
index 0c16bdd..a1b012c 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -2794,9 +2794,8 @@ find_entry_by_attr_value_remote(const char *attribute, const char
*value, Slapi_
vallen = value ? strlen(value) : 0;
filter_escaped_value = slapi_ch_calloc(sizeof(char), vallen*3+1);
- escape_filter_value(value, vallen, filter_escaped_value);
/* should not have to escape attribute names */
- filter = PR_smprintf("(%s=%s)",attribute,filter_escaped_value);
+ filter = PR_smprintf("(%s=%s)",attribute,escape_filter_value(value, vallen,
filter_escaped_value));
slapi_ch_free_string(&filter_escaped_value);
searchbase = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt));
cres = windows_search_entry(prp->conn, (char*)searchbase, filter, &found_entry);
@@ -2930,9 +2929,8 @@ find_entry_by_attr_value(const char *attribute, const char *value,
Slapi_Entry *
vallen = value ? strlen(value) : 0;
filter_escaped_value = slapi_ch_calloc(sizeof(char), vallen*3+1);
- escape_filter_value(value, vallen, filter_escaped_value);
/* should not have to escape attribute names */
- query = slapi_ch_smprintf("(%s=%s)", attribute, filter_escaped_value);
+ query = slapi_ch_smprintf("(%s=%s)", attribute, escape_filter_value(value,
vallen, filter_escaped_value));
slapi_ch_free_string(&filter_escaped_value);
if (query == NULL)