From b5fe30ef6d128863417cb799a0fa336dde9f5ba4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 25 Apr 2025 17:32:16 +0200 Subject: [PATCH] lib:cmdline: Check if we have a valid default ccache If you don't specify anything, and we have a valid ccache then try to use it! > smbclient -L //samba1.earth.milkyway.site Anonymous login successful Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers IPC$ IPC IPC Service (Samba 4.22.1) SMB1 disabled -- no workgroup available In case the user specifies a principal, it will ask for a password: > bin/smbclient -L //samba1.earth.milkyway.site -Ualice1@EARTH.MILKYWAY.SITE Password for [alice1@EARTH.MILKYWAY.SITE]: Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy --- lib/cmdline/cmdline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c index e434d65a2ef..f96ca88f95b 100644 --- a/lib/cmdline/cmdline.c +++ b/lib/cmdline/cmdline.c @@ -1031,8 +1031,8 @@ static void popt_common_credentials_callback(poptContext popt_ctx, } } - if (cli_credentials_get_kerberos_state(creds) == - CRED_USE_KERBEROS_REQUIRED) + if (cli_credentials_get_kerberos_state(creds) != + CRED_USE_KERBEROS_DISABLED) { enum credentials_obtained ccache_obtained = CRED_UNINITIALISED; -- 2.47.2