CVE-2022-2031 testprogs: Fix auth with smbclient and krb5 ccache
authorAndreas Schneider <asn@samba.org>
Tue, 24 May 2022 08:17:00 +0000 (10:17 +0200)
committerJule Anger <janger@samba.org>
Sun, 24 Jul 2022 09:42:02 +0000 (11:42 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15047

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
[jsutton@samba.org Fixed conflict and renamed --use-krb5-ccache to
 --krb5-ccache]

testprogs/blackbox/test_kpasswd_heimdal.sh

index 7351ce022d13613eb627c00ad5e42e448b70c086..1e895daa1625516d2093b1e33115bb92dfd1a6b5 100755 (executable)
@@ -72,7 +72,7 @@ testit "kinit with user password" \
        do_kinit $TEST_PRINCIPAL $TEST_PASSWORD || failed=`expr $failed + 1`
 
 test_smbclient "Test login with user kerberos ccache" \
-       "ls" "$SMB_UNC" -k yes || failed=`expr $failed + 1`
+       "ls" "$SMB_UNC" --krb5-ccache=${KRB5CCNAME} || failed=`expr $failed + 1`
 
 testit "change user password with 'samba-tool user password' (unforced)" \
        $VALGRIND $PYTHON $samba_tool user password -W$DOMAIN -U$TEST_USERNAME%$TEST_PASSWORD -k no --newpassword=$TEST_PASSWORD_NEW || failed=`expr $failed + 1`
@@ -85,7 +85,7 @@ testit "kinit with user password" \
        do_kinit $TEST_PRINCIPAL $TEST_PASSWORD || failed=`expr $failed + 1`
 
 test_smbclient "Test login with user kerberos ccache" \
-       "ls" "$SMB_UNC" -k yes || failed=`expr $failed + 1`
+       "ls" "$SMB_UNC" --krb5-ccache=${KRB5CCNAME} || failed=`expr $failed + 1`
 
 ###########################################################
 ### check that a short password is rejected