From e6feccef0bf78ad193379b3022007c7575896fa1 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 20 May 1996 04:08:27 +0000 Subject: [PATCH] Do not keep source cache open if we are going to use it as the target cache. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8053 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/ksu/ChangeLog | 4 ++++ src/clients/ksu/main.c | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/clients/ksu/ChangeLog b/src/clients/ksu/ChangeLog index bba29b6e0..cc5925a05 100644 --- a/src/clients/ksu/ChangeLog +++ b/src/clients/ksu/ChangeLog @@ -1,3 +1,7 @@ +Mon May 20 00:07:16 1996 Sam Hartman + + * main.c (main): Do not force source cache open if we are going to use it as the target. + Sun May 19 13:41:21 1996 Sam Hartman * main.c: Force source ccache to stay open between transactions. diff --git a/src/clients/ksu/main.c b/src/clients/ksu/main.c index b09fd6fe1..70e895b0c 100644 --- a/src/clients/ksu/main.c +++ b/src/clients/ksu/main.c @@ -388,12 +388,13 @@ char * dir_of_cc_source; exit(1); } - if (((retval = krb5_cc_set_flags(ksu_context, cc_source, 0x0)) != 0) - && (retval != KRB5_FCC_NOFILE)) { - com_err(prog_name, retval, "while opening ccache"); - exit(1); + if(!use_source_cache) { + if (((retval = krb5_cc_set_flags(ksu_context, cc_source, 0x0)) != 0) + && (retval != KRB5_FCC_NOFILE)) { + com_err(prog_name, retval, "while opening ccache"); + exit(1); + } } - if ((retval = get_best_princ_for_target(ksu_context, source_uid, target_uid, source_user, target_user, cc_source, &options, cmd, localhostname, &client, &hp))){ -- 2.26.2