1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

s4-selftest: Demonstrate the correct behaviour between specified usernames and kerberos ccache

This shows that a username/password on the command line must always
override any credentials cache in the environment.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2012-05-24 13:36:20 +10:00 committed by Alexander Bokovoy
parent dc3f74a953
commit ca2b6259b7

View File

@ -72,6 +72,14 @@ testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile
test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
#
# These tests demonstrate that a credential cache in the environment does not
# override a username/password, even an incorrect one, on the command line
#
testit_expect_failure "Test login with user kerberos ccache, but wrong password specified" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k yes -Unettestuser@$REALM%wrongpass && failed=`expr $failed + 1`
testit_expect_failure "Test login with user kerberos ccache, but old password specified" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k yes -Unettestuser@$REALM%$USERPASS && failed=`expr $failed + 1`
USERPASS=$NEWUSERPASS
WEAKPASS=testpass1