Plug global_host race condition/leak

This commit is contained in:
Howard Chu 2007-01-25 12:16:55 +00:00
parent ea8a2894c4
commit ba68a94f11
2 changed files with 6 additions and 4 deletions

View file

@ -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 );

View file

@ -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 &&