diff options
-rw-r--r-- | lib/libpam/modules/pam_krb5/pam_krb5.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index d16b96e..9162bab 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -406,12 +406,15 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, /* Retrieve the temporary cache */ retval = pam_get_data(pamh, "ccache", (const void **)&cache_name); - if (retval != PAM_SUCCESS) + if (retval != PAM_SUCCESS) { + retval = PAM_CRED_UNAVAIL; goto cleanup3; + } krbret = krb5_cc_resolve(pam_context, cache_name, &ccache_temp); if (krbret != 0) { PAM_LOG("Error krb5_cc_resolve(\"%s\"): %s", cache_name, krb5_get_err_text(pam_context, krbret)); + retval = PAM_SERVICE_ERR; goto cleanup3; } |