mod->sml_op = LDAP_MOD_REPLACE;
mod->sml_flags = 0;
ber_str2bv( pr[i].name, 0, 0, &mod->sml_type );
+ mod->sml_numvals = pr[i].nvalues;
mod->sml_values = (struct berval *)ch_malloc( (pr[i].nvalues + 1) *
sizeof(struct berval));
for (j=0; j<pr[i].nvalues; j++) {
#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
#if SASL_VERSION_MAJOR >= 2
int sc;
sasl_conn_t *ctx = conn->c_sasl_authctx;
+ sasl_ssf_t sasl_ssf = ssf;
if ( ctx == NULL ) {
return LDAP_UNAVAILABLE;
}
- sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &ssf );
+ sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &sasl_ssf );
if ( sc != SASL_OK ) {
return LDAP_OTHER;
if ( !op->o_conn->c_sasl_bind_in_progress ) {
/* If we already authenticated once, must use a new context */
if ( op->o_conn->c_sasl_done ) {
- slap_ssf_t ssf = 0;
+ sasl_ssf_t ssf = 0;
const char *authid = NULL;
#if SASL_VERSION_MAJOR >= 2
sasl_getprop( ctx, SASL_SSF_EXTERNAL, (void *)&ssf );