From: Andreas Schneider Date: Fri, 25 Apr 2025 15:32:16 +0000 (+0200) Subject: lib:cmdline: Check if we have a valid default ccache X-Git-Tag: tdb-1.4.14~41 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5fe30ef6d128863417cb799a0fa336dde9f5ba4;p=thirdparty%2Fsamba.git 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 --- 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;