From 095bed6aa280a9960a2d7dd4b6badb10cc1105ba Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 12 Nov 2020 11:45:05 +0100 Subject: [PATCH] lib:cmdline: Set kerberos=required for --use-krb5-ccache=CCACHE Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- lib/cmdline/cmdline.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c index 41c6463a3b8..090207488cd 100644 --- a/lib/cmdline/cmdline.c +++ b/lib/cmdline/cmdline.c @@ -653,6 +653,15 @@ static void popt_common_credentials_callback(poptContext popt_ctx, const char *error_string = NULL; int rc; + ok = cli_credentials_set_kerberos_state(creds, + CRED_USE_KERBEROS_REQUIRED, + CRED_SPECIFIED); + if (!ok) { + fprintf(stderr, + "Failed to set Kerberos state to %s!\n", arg); + exit(1); + } + rc = cli_credentials_set_ccache(creds, lp_ctx, arg, -- 2.47.3