From 69949ba0086ac7a4f07ade7558fbe5c537220ebb Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 24 Feb 2017 10:48:57 -0500 Subject: cifs.upcall: use a MEMORY: ccache when instantiating from a keytab Using a more permanent ccache is potentially problematic when we're instantiating a new one. We might be operating under different creds than expected. Just use a MEMORY: ccache since we don't need it to last longer than the life of the upcall anyway. Reported-and-Tested-by: Chad William Seys Signed-off-by: Jeff Layton --- cifs.upcall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cifs.upcall.c b/cifs.upcall.c index e0d3724..89563fd 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -410,9 +410,9 @@ init_cc_from_keytab(const char *keytab_name, const char *user) goto icfk_cleanup; } - ret = krb5_cc_default(context, &cc); + ret = krb5_cc_resolve(context, "MEMORY:", &cc); if (ret) { - syslog(LOG_DEBUG, "krb5_cc_default: %d", (int)ret); + syslog(LOG_DEBUG, "krb5_cc_resolve: %d", (int)ret); goto icfk_cleanup; } -- cgit v1.2.3