Blame 0335-Ticket-621-modify-operations-without-values-do-not-g.patch
|
|
dc8c34 |
From 86d41abf1a34e91668eeb6b594d3649e89c9caca Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Ludwig Krispenz <lkrispen@redhat.com>
|
|
|
dc8c34 |
Date: Wed, 13 Mar 2013 10:53:44 +0100
|
|
|
dc8c34 |
Subject: [PATCH] Ticket #621 - modify operations without values do not get
|
|
|
dc8c34 |
replicated
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Description: This was introduced by the fix for ticket 561 where in the
|
|
|
dc8c34 |
_cl5WriteMod the mods were checked if the values need to be encrypted
|
|
|
dc8c34 |
and only mods with values were written to the changelog
|
|
|
dc8c34 |
|
|
|
dc8c34 |
reviewed by Mark, Thanks
|
|
|
dc8c34 |
|
|
|
dc8c34 |
(cherry picked from commit 5a5ff2640d6e66c925550498211743a8f78a8477)
|
|
|
dc8c34 |
(cherry picked from commit 439ed95bfc4e892b256a71448838954d15decf9c)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/plugins/replication/cl5_api.c | 6 +++++-
|
|
|
dc8c34 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
|
|
|
dc8c34 |
index 0618d9b..dd3168a 100644
|
|
|
dc8c34 |
--- a/ldap/servers/plugins/replication/cl5_api.c
|
|
|
dc8c34 |
+++ b/ldap/servers/plugins/replication/cl5_api.c
|
|
|
dc8c34 |
@@ -2537,11 +2537,15 @@ _cl5WriteMod (LDAPMod *mod, char **buff)
|
|
|
dc8c34 |
memcpy (pos, &count, sizeof (count));
|
|
|
dc8c34 |
pos += sizeof (PRInt32);
|
|
|
dc8c34 |
|
|
|
dc8c34 |
+ /* if the mod has no values, eg delete attr or replace attr without values
|
|
|
dc8c34 |
+ * do not reset buffer
|
|
|
dc8c34 |
+ */
|
|
|
dc8c34 |
+ rc = 0;
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
bv = slapi_mod_get_first_value (&smod);
|
|
|
dc8c34 |
while (bv)
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
encbv = NULL;
|
|
|
dc8c34 |
- rc = 0;
|
|
|
dc8c34 |
rc = clcrypt_encrypt_value(s_cl5Desc.clcrypt_handle,
|
|
|
dc8c34 |
bv, &encbv);
|
|
|
dc8c34 |
if (rc > 0) {
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.9.3
|
|
|
dc8c34 |
|