andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0007-Ticket-47489-Under-specific-values-of-nsDS5ReplicaNa.patch

ba46c7
From b28da0d94c219c9ccfae51ee603d92220de23084 Mon Sep 17 00:00:00 2001
ba46c7
From: "Thierry bordaz (tbordaz)" <tbordaz@redhat.com>
ba46c7
Date: Wed, 11 Sep 2013 11:08:58 +0200
ba46c7
Subject: [PATCH 7/7] Ticket 47489 - Under specific values of nsDS5ReplicaName,
ba46c7
 replication may get broken or updates missing
ba46c7
ba46c7
Bug Description:
ba46c7
	If the 'nsDS5ReplicaName' (of a replica), contains the database suffix (e.g. 'db', 'db3' or 'db4).
ba46c7
	Then replication plugin fails to open the changelog. It could conduct to changelog being recreated or some
ba46c7
	last updates to be corrupted.
ba46c7
	A consequence that I can reproduce, is that some updates may be removed from the changelog and missing
ba46c7
	updates on consumers.
ba46c7
	This could conduct to replication break, if for example an entry created is not replicated and then later updated.
ba46c7
ba46c7
Fix Description:
ba46c7
	The fix consist to use 'PL_strrstr' rather than 'strstr' to check the database suffix is valid
ba46c7
ba46c7
https://fedorahosted.org/389/ticket/47489
ba46c7
ba46c7
Reviewed by: Rich Megginson (thanks Rich !)
ba46c7
ba46c7
Platforms tested: Fedora 17
ba46c7
ba46c7
Flag Day: no
ba46c7
ba46c7
Doc impact: no
ba46c7
(cherry picked from commit 7a7609d88caf9c0971e694d7eeb78f30aea7fec9)
ba46c7
(cherry picked from commit ac8aad8260d3e5ed403e2d4a9967447a97925ba7)
ba46c7
---
ba46c7
 ldap/servers/plugins/replication/cl5_api.c | 2 +-
ba46c7
 1 file changed, 1 insertion(+), 1 deletion(-)
ba46c7
ba46c7
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
ba46c7
index 0a70d6b..7bedc2c 100644
ba46c7
--- a/ldap/servers/plugins/replication/cl5_api.c
ba46c7
+++ b/ldap/servers/plugins/replication/cl5_api.c
ba46c7
@@ -6161,7 +6161,7 @@ static int _cl5FileEndsWith(const char *filename, const char *ext)
ba46c7
 	{
ba46c7
 		return 0;
ba46c7
 	}
ba46c7
-	p = strstr(filename, ext);
ba46c7
+	p = PL_strrstr(filename, ext);
ba46c7
 	if (NULL == p)
ba46c7
 	{
ba46c7
 		return 0;
ba46c7
-- 
ba46c7
1.8.1.4
ba46c7