1
0
Эх сурвалжийг харах

Ticket #47948 - ldap_sasl_bind fails assertion (ld != NULL) if it is called from chainingdb_bind over SSL/startTLS

Bug Description: In case startTLS, if ldap_start_tls_s called from
cb_get_connection failed and it returned non LDAP_SUCCESS return
code, the code was stored in the local variable just in the error
case, used only for error logging and abandoned in the scope; the
caller cb_get_connection returned LDAP_SUCCESS even if the connection
was not established.  That confuses the caller of cb_get_connection
and let it call ldap_sasl_bind with NULL ld and it causes the assertion
failure.

Fix Description: remove the local variable declaration in the scope.

https://fedorahosted.org/389/ticket/47948

Reviewed by [email protected] (Thank you, Rich!!)
Noriko Hosoi 11 жил өмнө
parent
commit
47868d3e52

+ 0 - 1
ldap/servers/plugins/chainingdb/cb_conn_stateless.c

@@ -463,7 +463,6 @@ cb_get_connection(cb_conn_pool * pool,
 					ldap_controls_free(serverctrls);
 				}
 			} else if (secure == 2) {
-				int rc;
 				/* the start_tls operation is usually performed in slapi_ldap_bind, but
 				   since we are not binding we still need to start_tls */
 				if (cb_debug_on()) {