]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:cmdline: POPT_CALLBACK_REASON_POST should handle if we skip the password callback
authorAndreas Schneider <asn@samba.org>
Fri, 11 Apr 2025 08:56:43 +0000 (10:56 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 15 Apr 2025 12:54:57 +0000 (12:54 +0000)
It is already checking if there is a valid ccache and disabling the callback.
In case of IAKerb we specify a ccache but might to fill one with a krbtgt.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr 15 12:54:57 UTC 2025 on atb-devel-224

lib/cmdline/cmdline.c
testprogs/blackbox/test_client_kerberos.sh

index 5902628cc154e2d0eb647fc516ba74fd3fbd8d8e..e434d65a2ef019df472f94c94492b140c403b40e 100644 (file)
@@ -1202,7 +1202,10 @@ static void popt_common_credentials_callback(poptContext popt_ctx,
                        exit(1);
                }
 
-               skip_password_callback = true;
+               /*
+                * The password callback will be skipped, if we have a valid
+                * ccache. This is handled in POPT_CALLBACK_REASON_POST.
+                */
                break;
        }
        case OPT_USE_WINBIND_CCACHE:
index 54554ea32900c2b75ec8641a485ddf0d5faaa29d..395b5bc989a80d896f45bb9fff7989a75906dee5 100755 (executable)
@@ -147,7 +147,7 @@ testit "test rpcclient kerberos" \
        failed=$(expr $failed + 1)
 
 cmd='echo ${PASSWORD} | $samba_rpcclient ncacn_np:${SERVER} -U${USERNAME} --use-krb5-ccache=$KRB5CCNAME --configfile=${CONFIGURATION} -c getusername 2>&1'
-testit_expect_failure "test rpcclient kerberos interactive (negative test)" \
+testit "test rpcclient kerberos interactive" \
        test_rpc_getusername ||
        failed=$(expr $failed + 1)