&config_generic, NULL, NULL, NULL },
{ "sasl-host", "host", 2, 2, 0,
#ifdef HAVE_CYRUS_SASL
- ARG_STRING|ARG_UNIQUE, &global_host,
+ ARG_STRING|ARG_UNIQUE, &sasl_host,
#else
ARG_IGNORED, NULL,
#endif
int global_idletimeout = 0;
char *global_host = NULL;
char *global_realm = NULL;
+char *sasl_host = NULL;
char **default_passwd_hash = NULL;
struct berval default_search_base = BER_BVNULL;
struct berval default_search_nbase = BER_BVNULL;
}
#endif
+#ifdef HAVE_CYRUS_SASL
+ if( sasl_host == NULL ) {
+ sasl_host = ch_strdup( global_host );
+ }
+#endif
+
(void) SIGNAL( LDAP_SIGUSR1, slap_sig_wake );
(void) SIGNAL( LDAP_SIGUSR2, slap_sig_shutdown );
LDAP_SLAPD_V (int) global_idletimeout;
LDAP_SLAPD_V (char *) global_host;
LDAP_SLAPD_V (char *) global_realm;
+LDAP_SLAPD_V (char *) sasl_host;
LDAP_SLAPD_V (char **) default_passwd_hash;
LDAP_SLAPD_V (int) lber_debug;
LDAP_SLAPD_V (int) ldap_syslog;
#ifdef HAVE_CYRUS_SASL
sasl_done();
#endif
- free( global_host );
- global_host = NULL;
+ free( sasl_host );
+ sasl_host = NULL;
return 0;
}
ipremoteport = slap_sasl_peer2ipport( &conn->c_peer_name );
}
- sc = sasl_server_new( "ldap", global_host, global_realm,
+ sc = sasl_server_new( "ldap", sasl_host, global_realm,
iplocalport, ipremoteport, session_callbacks, SASL_SUCCESS_DATA, &ctx );
if ( iplocalport != NULL ) {
ch_free( iplocalport );
ch_free( ipremoteport );
}
#else
- sc = sasl_server_new( "ldap", global_host, global_realm,
+ sc = sasl_server_new( "ldap", sasl_host, global_realm,
session_callbacks, SASL_SECURITY_LAYER, &ctx );
#endif