From 1c89bdb6a900b6184f53a27d5d5ea01221969418 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 22 Apr 2022 15:46:06 +0200 Subject: [PATCH] testprogs: Reformat test_weak_disable_ntlmssp_ldap.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shfmt -w -p -i 0 -fn testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- .../blackbox/test_weak_disable_ntlmssp_ldap.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh b/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh index 2822ab29d14..efd6c974826 100755 --- a/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh +++ b/testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh @@ -3,10 +3,10 @@ # Copyright (c) 2022 Pavel Filipenský if [ $# -lt 2 ]; then -cat <&1 || failed=`expr $failed + 1` +testit_grep "testparm" "Weak crypto is allowed" $samba_testparm --suppress-prompt $SMB_CONF_PATH 2>&1 || failed=$(expr $failed + 1) # We should be allowed to use NTLM for connecting -testit "net_ads_search.ntlm" $samba_net ads search --use-kerberos=off '(objectCategory=group)' sAMAccountName -U${USERNAME}%${PASSWORD} || failed=`expr $failed + 1` +testit "net_ads_search.ntlm" $samba_net ads search --use-kerberos=off '(objectCategory=group)' sAMAccountName -U${USERNAME}%${PASSWORD} || failed=$(expr $failed + 1) GNUTLS_FORCE_FIPS_MODE=1 export GNUTLS_FORCE_FIPS_MODE # Checks that testparm reports: Weak crypto is disallowed -testit_grep "testparm" "Weak crypto is disallowed" $samba_testparm --suppress-prompt $SMB_CONF_PATH 2>&1 || failed=`expr $failed + 1` +testit_grep "testparm" "Weak crypto is disallowed" $samba_testparm --suppress-prompt $SMB_CONF_PATH 2>&1 || failed=$(expr $failed + 1) # We should not be allowed to use NTLM for connecting -testit_expect_failure_grep "net_ads_search.ntlm" "We can't fallback to NTLMSSP, weak crypto is disallowed." $samba_net ads search --use-kerberos=off -d10 '(objectCategory=group)' sAMAccountName -U${USERNAME}%${PASSWORD} || failed=`expr $failed + 1` +testit_expect_failure_grep "net_ads_search.ntlm" "We can't fallback to NTLMSSP, weak crypto is disallowed." $samba_net ads search --use-kerberos=off -d10 '(objectCategory=group)' sAMAccountName -U${USERNAME}%${PASSWORD} || failed=$(expr $failed + 1) unset GNUTLS_FORCE_FIPS_MODE