1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-30 17:49:30 +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 #!/bin/sh
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
cat <<EOF cat <<EOF
Usage: test_smbd_no_krb5.sh SERVER USERNAME PASSWORD PREFIX Usage: test_smbd_no_krb5.sh SERVER USERNAME PASSWORD PREFIX
EOF EOF
exit 1; exit 1
fi fi
smbclient=$1 smbclient=$1
@ -20,7 +20,7 @@ if test -x ${samba_bindir}/samba4kinit; then
samba_kinit=${samba_bindir}/samba4kinit samba_kinit=${samba_bindir}/samba4kinit
fi fi
incdir=`dirname $0`/../../../testprogs/blackbox incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh . $incdir/subunit.sh
. $incdir/common_test_fns.inc . $incdir/common_test_fns.inc
@ -29,18 +29,18 @@ failed=0
opt="--option=gensec:gse_krb5=yes -U${USERNAME}%${PASSWORD}" opt="--option=gensec:gse_krb5=yes -U${USERNAME}%${PASSWORD}"
# check kerberos access # 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 # disbale krb5 globally so smbd won't accept it
global_inject_conf=$(dirname $SMB_CONF_PATH)/global_inject.conf 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 # 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 # 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 testok $0 $failed