Commit ba68a94f authored by Howard Chu's avatar Howard Chu
Browse files

Plug global_host race condition/leak

parent ea8a2894
......@@ -830,6 +830,12 @@ unhandled_option:;
}
#endif
#ifdef HAVE_CYRUS_SASL
if( global_host == NULL ) {
global_host = ldap_pvt_get_fqdn( NULL );
}
#endif
(void) SIGNAL( LDAP_SIGUSR1, slap_sig_wake );
(void) SIGNAL( LDAP_SIGUSR2, slap_sig_shutdown );
......
......@@ -1138,10 +1138,6 @@ int slap_sasl_open( Connection *conn, int reopen )
conn->c_sasl_layers = 0;
if( global_host == NULL ) {
global_host = ldap_pvt_get_fqdn( NULL );
}
/* create new SASL context */
#if SASL_VERSION_MAJOR >= 2
if ( conn->c_sock_name.bv_len != 0 &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment