andykimpe / rpms / 389-ds-base

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