diff options
author | Ondrej Kos <okos@redhat.com> | 2013-06-24 16:55:02 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-07-10 16:59:26 +0200 |
commit | 0c0f91311fd2a947992914d8bca644cd1eb4298b (patch) | |
tree | 80ae7d960f7558967ac3c781ad6ea3cc3841f7a1 /src/providers/krb5 | |
parent | 9651a27ec14f3a378e861ca39852480f37f1ef08 (diff) | |
download | sssd-0c0f91311fd2a947992914d8bca644cd1eb4298b.tar.gz sssd-0c0f91311fd2a947992914d8bca644cd1eb4298b.tar.bz2 sssd-0c0f91311fd2a947992914d8bca644cd1eb4298b.zip |
KRB5_CHILD: Fix handling of get_password return code
The switch statement was dead code due to missing case/default.
Diffstat (limited to 'src/providers/krb5')
-rw-r--r-- | src/providers/krb5/krb5_child.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 9480d2b3..4d12b90a 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -1451,12 +1451,18 @@ static errno_t tgt_req_child(struct krb5_req *kr) ret = sss_authtok_get_password(kr->pd->authtok, &password, NULL); switch (ret) { - if (ret == EACCES) { + case EOK: + break; + + case EACCES: DEBUG(SSSDBG_OP_FAILURE, ("Invalid authtok type\n")); return ERR_INVALID_CRED_TYPE; - } - DEBUG(SSSDBG_OP_FAILURE, ("No credentials available\n")); - return ERR_NO_CREDS; + break; + + default: + DEBUG(SSSDBG_OP_FAILURE, ("No credentials available\n")); + return ERR_NO_CREDS; + break; } kerr = get_and_save_tgt(kr, password); |