ldap/servers/plugins/replication/repl5_replica.c | 1 +
ldap/servers/plugins/replication/repl5_updatedn_list.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 35f6fb8fca9ed12deadd1d50c65fb0947a7b1768
Author: Thierry Bordaz <tbordaz(a)redhat.com>
Date: Thu May 12 15:38:28 2016 +0200
Ticket 48836 replication session fails because of permission denied
Bug Description:
https://fedorahosted.org/389/ticket/48597 fix introduced a regression where it
tests (in replica_is_updatedn) the returned value of
replica_updatedn_list_ismember
against PR_TRUE.
Actually replica_updatedn_list_ismember returns PR_FALSE or a pointer to the found
value
but not PR_TRUE.
Fix Description:
replica_updatedn_list_ismember should return PR_TRUE or PR_FALSE where the cast
make it return
values that are different from PR_TRUE or PR_FALSE
https://fedorahosted.org/389/ticket/48836
Reviewed by: Noriko Hosoi, Ludwig Krispenz (thanks for your reviews)
Platforms tested: F24
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/plugins/replication/repl5_replica.c
b/ldap/servers/plugins/replication/repl5_replica.c
index f935b9c..5de6a49 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -1155,6 +1155,7 @@ replica_is_updatedn (Replica *r, const Slapi_DN *sdn)
if (r->updatedn_list) {
result = replica_updatedn_list_ismember(r->updatedn_list, sdn);
if (result == PR_TRUE) {
+ /* sdn is present in the updatedn_list */
replica_unlock(r->repl_lock);
return result;
}
diff --git a/ldap/servers/plugins/replication/repl5_updatedn_list.c
b/ldap/servers/plugins/replication/repl5_updatedn_list.c
index a6609bc..c04a53f 100644
--- a/ldap/servers/plugins/replication/repl5_updatedn_list.c
+++ b/ldap/servers/plugins/replication/repl5_updatedn_list.c
@@ -284,7 +284,10 @@ replica_updatedn_list_ismember(ReplicaUpdateDNList list, const
Slapi_DN *dn)
/* Bug 605169 - null ndn would cause core dump */
if ( ndn ) {
- ret = (PRBool)((uintptr_t)PL_HashTableLookupConst(hash, ndn));
+ if ((uintptr_t)PL_HashTableLookupConst(hash, ndn))
+ ret = PR_TRUE;
+ else
+ ret = PR_FALSE;
}
return ret;