1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:tests: Reformat test_smbd_no_krb5.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2022-04-22 15:34:11 +02:00 committed by Andrew Bartlett
parent 0754d46cd1
commit a1520e4e58

View File

@ -1,10 +1,10 @@
#!/bin/sh
if [ $# -lt 1 ]; then
cat <<EOF
cat <<EOF
Usage: test_smbd_no_krb5.sh SERVER USERNAME PASSWORD PREFIX
EOF
exit 1;
exit 1
fi
smbclient=$1
@ -20,7 +20,7 @@ if test -x ${samba_bindir}/samba4kinit; then
samba_kinit=${samba_bindir}/samba4kinit
fi
incdir=`dirname $0`/../../../testprogs/blackbox
incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh
. $incdir/common_test_fns.inc
@ -29,18 +29,18 @@ failed=0
opt="--option=gensec:gse_krb5=yes -U${USERNAME}%${PASSWORD}"
# check kerberos access
test_smbclient "test_krb5" "ls" "//$SERVER/tmp" $opt --use-kerberos=required || failed=`expr $failed + 1`
test_smbclient "test_krb5" "ls" "//$SERVER/tmp" $opt --use-kerberos=required || failed=$(expr $failed + 1)
# disbale krb5 globally so smbd won't accept it
global_inject_conf=$(dirname $SMB_CONF_PATH)/global_inject.conf
echo 'gensec:gse_krb5=no' > $global_inject_conf
echo 'gensec:gse_krb5=no' >$global_inject_conf
# verify that kerberos fails
test_smbclient_expect_failure "smbd_no_krb5" "ls" "//$SERVER/tmp" --use-kerberos=required $opt || failed=`expr $failed + 1`
test_smbclient_expect_failure "smbd_no_krb5" "ls" "//$SERVER/tmp" --use-kerberos=required $opt || failed=$(expr $failed + 1)
# verify downgrade to ntlmssp
test_smbclient "test_spnego_downgrade" "ls" "//$SERVER/tmp" $opt --use-kerberos=disabled || failed=`expr $failed + 1`
test_smbclient "test_spnego_downgrade" "ls" "//$SERVER/tmp" $opt --use-kerberos=disabled || failed=$(expr $failed + 1)
echo '' > $global_inject_conf
echo '' >$global_inject_conf
testok $0 $failed