Commit 4b310215 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#3864 from HEAD

parent 7c62dc8f
......@@ -898,6 +898,8 @@ ldap_int_sasl_external(
sasl_conn_t *ctx;
#if SASL_VERSION_MAJOR < 2
sasl_external_properties_t extprops;
#else
sasl_ssf_t sasl_ssf = ssf;
#endif
ctx = conn->lconn_sasl_authctx;
......@@ -907,7 +909,7 @@ ldap_int_sasl_external(
}
#if SASL_VERSION_MAJOR >= 2
sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &ssf );
sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &sasl_ssf );
if ( sc == SASL_OK )
sc = sasl_setprop( ctx, SASL_AUTH_EXTERNAL, authid );
#else
......@@ -1205,6 +1207,8 @@ ldap_int_sasl_set_option( LDAP *ld, int option, void *arg )
int sc;
#if SASL_VERSION_MAJOR < 2
sasl_external_properties_t extprops;
#else
sasl_ssf_t sasl_ssf;
#endif
sasl_conn_t *ctx;
......@@ -1219,7 +1223,8 @@ ldap_int_sasl_set_option( LDAP *ld, int option, void *arg )
}
#if SASL_VERSION_MAJOR >= 2
sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, arg);
sasl_ssf = * (ber_len_t *)arg;
sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &sasl_ssf);
#else
memset(&extprops, 0L, sizeof(extprops));
......
......@@ -1191,12 +1191,13 @@ int slap_sasl_external(
#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;
......@@ -1365,7 +1366,7 @@ int slap_sasl_bind( Operation *op, SlapReply *rs )
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 );
......
Markdown is supported
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