diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-08 07:59:43 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-08 12:02:32 -0500 |
commit | b46635a151ca93b74a45bbaa3f782da43b3692f9 (patch) | |
tree | c8b3a371cd0dcc77fd822ed391bed10b4fa09c8e /src/providers/ldap | |
parent | 09b71830d7ff0ce10e16d39c750c04d20131cfa4 (diff) | |
download | sssd-b46635a151ca93b74a45bbaa3f782da43b3692f9.tar.gz sssd-b46635a151ca93b74a45bbaa3f782da43b3692f9.tar.xz sssd-b46635a151ca93b74a45bbaa3f782da43b3692f9.zip |
LDAP: Fix missing break statements in force_tls
Also add a default case to protect against bad input
Diffstat (limited to 'src/providers/ldap')
-rw-r--r-- | src/providers/ldap/sdap_async_connection.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c index 21b3d6411..6350e337e 100644 --- a/src/providers/ldap/sdap_async_connection.c +++ b/src/providers/ldap/sdap_async_connection.c @@ -1229,12 +1229,18 @@ static void sdap_cli_resolve_done(struct tevent_req *subreq) bool use_tls; switch (state->force_tls) { - case CON_TLS_DFL: - use_tls = dp_opt_get_bool(state->opts->basic, SDAP_ID_TLS); - case CON_TLS_ON: - use_tls = true; - case CON_TLS_OFF: - use_tls = false; + case CON_TLS_DFL: + use_tls = dp_opt_get_bool(state->opts->basic, SDAP_ID_TLS); + break; + case CON_TLS_ON: + use_tls = true; + break; + case CON_TLS_OFF: + use_tls = false; + break; + default: + tevent_req_error(req, EINVAL); + break; } ret = be_resolve_server_recv(subreq, &state->srv); |