return( 1 );
}
- if ( global_host != NULL ) {
+ if ( SLAPD_GLOBAL(host) != NULL ) {
Debug( LDAP_DEBUG_ANY,
"%s: line %d: already set sasl-host!\n",
fname, lineno, 0 );
return 1;
} else {
- global_host = ch_strdup( cargv[1] );
+ SLAPD_GLOBAL(host) = ch_strdup( cargv[1] );
}
/* set SASL realm */
return( 1 );
}
- if ( global_realm != NULL ) {
+ if ( SLAPD_GLOBAL(realm) != NULL ) {
Debug( LDAP_DEBUG_ANY,
"%s: line %d: already set sasl-realm!\n",
fname, lineno, 0 );
return 1;
} else {
- global_realm = ch_strdup( cargv[1] );
+ SLAPD_GLOBAL(realm) = ch_strdup( cargv[1] );
}
/* SASL security properties */
#ifdef HAVE_CYRUS_SASL
sasl_done();
#endif
- free( global_host );
- global_host = NULL;
+ free( SLAPD_GLOBAL(host) );
+ SLAPD_GLOBAL(host) = NULL;
return 0;
}
conn->c_sasl_layers = 0;
- if( global_host == NULL ) {
- global_host = ldap_pvt_get_fqdn( NULL );
+ if( SLAPD_GLOBAL(host) == NULL ) {
+ SLAPD_GLOBAL(host) = ldap_pvt_get_fqdn( NULL );
}
/* create new SASL context */
*p = ';';
}
}
- sc = sasl_server_new( "ldap", global_host, global_realm,
+ sc = sasl_server_new( "ldap", SLAPD_GLOBAL(host), SLAPD_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", SLAPD_GLOBAL(host), SLAPD_GLOBAL(realm),
session_callbacks, SASL_SECURITY_LAYER, &ctx );
#endif