diff options
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/sdap_async_connection.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c index a0b5e2ba..65bc667b 100644 --- a/src/providers/ldap/sdap_async_connection.c +++ b/src/providers/ldap/sdap_async_connection.c @@ -158,7 +158,7 @@ static void sdap_sys_connect_done(struct tevent_req *subreq) int sd; bool sasl_nocanon; const char *sasl_mech; - int sasl_minssf; + ber_len_t sasl_minssf; ret = sss_ldap_init_recv(subreq, &state->sh->ldap, &sd); talloc_zfree(subreq); @@ -286,16 +286,14 @@ static void sdap_sys_connect_done(struct tevent_req *subreq) sasl_mech = dp_opt_get_string(state->opts->basic, SDAP_SASL_MECH); if (sasl_mech != NULL) { - sasl_minssf = dp_opt_get_int(state->opts->basic, SDAP_SASL_MINSSF); - if (sasl_minssf >= 0) { - lret = ldap_set_option(state->sh->ldap, LDAP_OPT_X_SASL_SSF_MIN, - &sasl_minssf); - if (lret != LDAP_OPT_SUCCESS) { - DEBUG(SSSDBG_CRIT_FAILURE, - ("Failed to set LDAP MIN SSF option to %d\n", - sasl_minssf)); - goto fail; - } + sasl_minssf = (ber_len_t) dp_opt_get_int(state->opts->basic, + SDAP_SASL_MINSSF); + lret = ldap_set_option(state->sh->ldap, LDAP_OPT_X_SASL_SSF_MIN, + &sasl_minssf); + if (lret != LDAP_OPT_SUCCESS) { + DEBUG(SSSDBG_CRIT_FAILURE, + ("Failed to set LDAP MIN SSF option to %lu\n", sasl_minssf)); + goto fail; } } |