diff options
author | Jeff Layton <jlayton@samba.org> | 2017-02-24 10:48:57 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2017-02-28 13:08:59 -0500 |
commit | 69949ba0086ac7a4f07ade7558fbe5c537220ebb (patch) | |
tree | f01adee63b914744aac88ef74f7ee2e5c470cf52 | |
parent | 9eaa21ed37126d1bfcb998b4c8f6115ac77e9b5f (diff) | |
download | cifs-utils-69949ba0086ac7a4f07ade7558fbe5c537220ebb.tar.gz cifs-utils-69949ba0086ac7a4f07ade7558fbe5c537220ebb.tar.bz2 cifs-utils-69949ba0086ac7a4f07ade7558fbe5c537220ebb.zip |
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 <cwseys@physics.wisc.edu>
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | cifs.upcall.c | 4 |
1 files 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; } |