1 Star 0 Fork 43

like/openldap

forked from src-openEuler/openldap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-openldap-ssl-deadlock-revert.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
Anonymous_Z 提交于 2019-12-29 17:30 . init
diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c
index 3139eaf..49dc9b1 100644
--- a/libraries/libldap/tls_m.c
+++ b/libraries/libldap/tls_m.c
@@ -146,7 +146,6 @@ static int tlsm_init( void );
*/
static ldap_pvt_thread_mutex_t tlsm_ctx_count_mutex;
static ldap_pvt_thread_mutex_t tlsm_init_mutex;
-static ldap_pvt_thread_mutex_t tlsm_pem_mutex;
static PRCallOnceType tlsm_init_mutex_callonce = {0,0};
static PRStatus PR_CALLBACK
@@ -164,12 +163,6 @@ tlsm_thr_init_callonce( void )
return PR_FAILURE;
}
- if ( ldap_pvt_thread_mutex_init( &tlsm_pem_mutex ) ) {
- Debug( LDAP_DEBUG_ANY,
- "TLS: could not create mutex for PEM module: %d\n", errno, 0, 0 );
- return PR_FAILURE;
- }
-
return PR_SUCCESS;
}
@@ -2153,7 +2146,6 @@ tlsm_destroy( void )
#ifdef LDAP_R_COMPILE
ldap_pvt_thread_mutex_destroy( &tlsm_ctx_count_mutex );
ldap_pvt_thread_mutex_destroy( &tlsm_init_mutex );
- ldap_pvt_thread_mutex_destroy( &tlsm_pem_mutex );
#endif
}
@@ -2840,16 +2832,9 @@ static int
tlsm_session_accept_or_connect( tls_session *session, int is_accept )
{
tlsm_session *s = (tlsm_session *)session;
- int rc;
+ int rc = SSL_ForceHandshake( s );
const char *op = is_accept ? "accept" : "connect";
- if ( pem_module ) {
- LDAP_MUTEX_LOCK( &tlsm_pem_mutex );
- }
- rc = SSL_ForceHandshake( s );
- if ( pem_module ) {
- LDAP_MUTEX_UNLOCK( &tlsm_pem_mutex );
- }
if ( rc ) {
PRErrorCode err = PR_GetError();
rc = -1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pangzihapipangzi/openldap.git
git@gitee.com:pangzihapipangzi/openldap.git
pangzihapipangzi
openldap
openldap
master

搜索帮助