|
|
6d0b66 |
From bc41bbb89405b2059b80e344b2d4c59ae39aabe6 Mon Sep 17 00:00:00 2001
|
|
|
6d0b66 |
From: tbordaz <tbordaz@redhat.com>
|
|
|
6d0b66 |
Date: Thu, 10 Jun 2021 15:03:27 +0200
|
|
|
6d0b66 |
Subject: [PATCH 1/3] Issue 4797 - ACL IP ADDRESS evaluation may corrupt
|
|
|
6d0b66 |
c_isreplication_session connection flags (#4799)
|
|
|
6d0b66 |
|
|
|
6d0b66 |
Bug description:
|
|
|
6d0b66 |
The fix for ticket #3764 was broken with a missing break in a
|
|
|
6d0b66 |
switch. The consequence is that while setting the client IP
|
|
|
6d0b66 |
address in the pblock (SLAPI_CONN_CLIENTNETADDR_ACLIP), the
|
|
|
6d0b66 |
connection is erroneously set as replication connection.
|
|
|
6d0b66 |
This can lead to crash or failure of testcase
|
|
|
6d0b66 |
test_access_from_certain_network_only_ip.
|
|
|
6d0b66 |
This bug was quite hidden until the fix for #4764 is
|
|
|
6d0b66 |
showing it more frequently
|
|
|
6d0b66 |
|
|
|
6d0b66 |
Fix description:
|
|
|
6d0b66 |
Add the missing break
|
|
|
6d0b66 |
|
|
|
6d0b66 |
relates: https://github.com/389ds/389-ds-base/issues/4797
|
|
|
6d0b66 |
|
|
|
6d0b66 |
Reviewed by: Mark Reynolds
|
|
|
6d0b66 |
|
|
|
6d0b66 |
Platforms tested: F33
|
|
|
6d0b66 |
---
|
|
|
6d0b66 |
ldap/servers/slapd/pblock.c | 3 ++-
|
|
|
6d0b66 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
6d0b66 |
|
|
|
6d0b66 |
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
|
|
|
6d0b66 |
index fcac53839..a64986aeb 100644
|
|
|
6d0b66 |
--- a/ldap/servers/slapd/pblock.c
|
|
|
6d0b66 |
+++ b/ldap/servers/slapd/pblock.c
|
|
|
6d0b66 |
@@ -2595,7 +2595,7 @@ slapi_pblock_set(Slapi_PBlock *pblock, int arg, void *value)
|
|
|
6d0b66 |
pblock->pb_conn->c_authtype = slapi_ch_strdup((char *)value);
|
|
|
6d0b66 |
pthread_mutex_unlock(&(pblock->pb_conn->c_mutex));
|
|
|
6d0b66 |
break;
|
|
|
6d0b66 |
- case SLAPI_CONN_CLIENTNETADDR_ACLIP:
|
|
|
6d0b66 |
+ case SLAPI_CONN_CLIENTNETADDR_ACLIP:
|
|
|
6d0b66 |
if (pblock->pb_conn == NULL) {
|
|
|
6d0b66 |
break;
|
|
|
6d0b66 |
}
|
|
|
6d0b66 |
@@ -2603,6 +2603,7 @@ slapi_pblock_set(Slapi_PBlock *pblock, int arg, void *value)
|
|
|
6d0b66 |
slapi_ch_free((void **)&pblock->pb_conn->cin_addr_aclip);
|
|
|
6d0b66 |
pblock->pb_conn->cin_addr_aclip = (PRNetAddr *)value;
|
|
|
6d0b66 |
pthread_mutex_unlock(&(pblock->pb_conn->c_mutex));
|
|
|
6d0b66 |
+ break;
|
|
|
6d0b66 |
case SLAPI_CONN_IS_REPLICATION_SESSION:
|
|
|
6d0b66 |
if (pblock->pb_conn == NULL) {
|
|
|
6d0b66 |
slapi_log_err(SLAPI_LOG_ERR,
|
|
|
6d0b66 |
--
|
|
|
6d0b66 |
2.31.1
|
|
|
6d0b66 |
|