diff options
author | Jan Vcelak <jvcelak@redhat.com> | 2012-07-16 08:57:06 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-07-18 13:12:48 +0200 |
commit | bc76428246c4ce532abd0eadcd539069fc1d94a8 (patch) | |
tree | 3cd09805d70729a2e9ba6b3d1167472b18daa553 /src | |
parent | 068144e2783f3fc65eabe3e89e303641fdb9dfe0 (diff) | |
download | sssd-bc76428246c4ce532abd0eadcd539069fc1d94a8.tar.gz sssd-bc76428246c4ce532abd0eadcd539069fc1d94a8.tar.xz sssd-bc76428246c4ce532abd0eadcd539069fc1d94a8.zip |
LDAP: Properly cast type for MINSSF value
Diffstat (limited to 'src')
-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 a0b5e2ba7..65bc667b9 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; } } |