From f47e64bb5afa4b485ee05f4effefa6ad89b3b721 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Thu, 27 Aug 2020 23:53:54 -0500 Subject: [PATCH] kinit: Work again w/o -c or KRB5CCNAME --- kuser/kinit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kuser/kinit.c b/kuser/kinit.c index a48f103af..8d63d1509 100644 --- a/kuser/kinit.c +++ b/kuser/kinit.c @@ -1570,7 +1570,8 @@ main(int argc, char **argv) * default credential */ type = krb5_cc_get_type(context, ccache); - if (krb5_cc_support_switch(context, type)) { + if (krb5_cc_support_switch(context, type) && + strcmp(type, "FILE")) { krb5_cc_close(context, ccache); ret = get_switched_ccache(context, type, principal, &ccache);