From: Kang Yang Date: Fri, 6 Feb 2026 01:27:23 +0000 (+0000) Subject: ITS#10443 slap_sasl_mechs(): must mutex SASL call X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d76680ec8b9650baf22f379582822c5cbd7c634;p=thirdparty%2Fopenldap.git ITS#10443 slap_sasl_mechs(): must mutex SASL call --- diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 2f40f9c1ec..c6a71c6e3b 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -1548,11 +1548,13 @@ char ** slap_sasl_mechs( Connection *conn ) int sc; SASL_CONST char *mechstr; + ldap_pvt_thread_mutex_lock( &conn->c_mutex ); sc = sasl_listmech( ctx, NULL, NULL, ",", NULL, &mechstr, NULL, NULL ); if( sc != SASL_OK ) { + ldap_pvt_thread_mutex_unlock( &conn->c_mutex ); Debug( LDAP_DEBUG_ANY, "slap_sasl_listmech failed: %d\n", sc ); @@ -1560,6 +1562,7 @@ char ** slap_sasl_mechs( Connection *conn ) } mechs = ldap_str2charray( mechstr, "," ); + ldap_pvt_thread_mutex_unlock( &conn->c_mutex ); } #elif defined(SLAP_BUILTIN_SASL) /* builtin SASL implementation */