summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-01-04 23:41:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:55 -0500
commit11c6f573af5c1d3387e60f3fc44b00e28cd87813 (patch)
tree39ef9058370be4c1a388f6cbe7257972ede27fae /source
parent7dcb61d1b2d08270a8c718328a26ef4866a1c500 (diff)
downloadsamba-11c6f573af5c1d3387e60f3fc44b00e28cd87813.tar.gz
samba-11c6f573af5c1d3387e60f3fc44b00e28cd87813.tar.xz
samba-11c6f573af5c1d3387e60f3fc44b00e28cd87813.zip
r20536: In the offline PAM session close case the attempt to delete a
non-existing krb5 credential cache should not generate an error. Guenther
Diffstat (limited to 'source')
-rw-r--r--source/libads/krb5_errs.c2
-rw-r--r--source/nsswitch/winbindd_cred_cache.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/source/libads/krb5_errs.c b/source/libads/krb5_errs.c
index a4a3bd3adb3..89cfc2d1439 100644
--- a/source/libads/krb5_errs.c
+++ b/source/libads/krb5_errs.c
@@ -56,6 +56,8 @@ static const struct {
#if defined(KRB5KRB_ERR_RESPONSE_TOO_BIG)
{KRB5KRB_ERR_RESPONSE_TOO_BIG, NT_STATUS_PROTOCOL_UNREACHABLE},
#endif
+ {KRB5_CC_NOTFOUND, NT_STATUS_NO_SUCH_FILE},
+ {KRB5_FCC_NOFILE, NT_STATUS_NO_SUCH_FILE},
{KRB5KDC_ERR_NONE, NT_STATUS_OK},
{0, NT_STATUS_OK}
};
diff --git a/source/nsswitch/winbindd_cred_cache.c b/source/nsswitch/winbindd_cred_cache.c
index 5772be15a86..def4c6197cc 100644
--- a/source/nsswitch/winbindd_cred_cache.c
+++ b/source/nsswitch/winbindd_cred_cache.c
@@ -419,7 +419,11 @@ NTSTATUS remove_ccache(const char *username)
#ifdef HAVE_KRB5
ret = ads_kdestroy(entry->ccname);
- if (ret) {
+
+ /* we ignore the error when there has been no credential cache */
+ if (ret == KRB5_FCC_NOFILE) {
+ ret = 0;
+ } else if (ret) {
DEBUG(0,("remove_ccache: failed to destroy user krb5 ccache %s with: %s\n",
entry->ccname, error_message(ret)));
} else {