diff options
author | Samuel Cabrero <scabrero@suse.de> | 2018-08-31 18:24:56 +0200 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-12-19 12:42:12 +0100 |
commit | dfa149276f1e2c1a64208ff33ca161008f012d6d (patch) | |
tree | 3b917e61077d282cd68e981c24ef6463dac437d7 /source3 | |
parent | caa505302f5e8752f997fe8aef6cef878f2e3f35 (diff) | |
download | samba-dfa149276f1e2c1a64208ff33ca161008f012d6d.tar.gz |
tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth plaintext authentication with require-membership-of
Port ntlm_auth bash script tests to python
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/script/tests/test_ntlm_auth_s3.sh | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/source3/script/tests/test_ntlm_auth_s3.sh b/source3/script/tests/test_ntlm_auth_s3.sh index 3b3c5dfe7ef..2a4942bb9f5 100755 --- a/source3/script/tests/test_ntlm_auth_s3.sh +++ b/source3/script/tests/test_ntlm_auth_s3.sh @@ -24,37 +24,6 @@ BADSID=`eval $BINDIR/wbinfo -n $USERNAME | cut -d ' ' -f1 | sed 's/..$//'` failed=0 -test_plaintext_check_output_stdout() -{ - tmpfile=$PREFIX/ntlm_commands - - cat > $tmpfile <<EOF -$DOMAIN/$USERNAME $PASSWORD -EOF - cmd='$NTLM_AUTH "$@" --require-membership-of=$SID --helper-protocol=squid-2.5-basic < $tmpfile 2>&1' - eval echo "$cmd" - out=`eval $cmd` - ret=$? - rm -f $tmpfile - - if [ $ret != 0 ] ; then - echo "$out" - echo "command failed" - false - return - fi - - echo "$out" | grep "OK" >/dev/null 2>&1 - - if [ $? = 0 ] ; then - # authenticated .. succeed - true - else - echo failed to get successful authentication - false - fi -} - test_plaintext_check_output_fail() { tmpfile=$PREFIX/ntlm_commands @@ -269,7 +238,6 @@ EOF } # This should work even with NTLMv2 -testit "ntlm_auth plaintext authentication with require-membership-of" test_plaintext_check_output_stdout || failed=`expr $failed + 1` testit "ntlm_auth plaintext authentication with failed require-membership-of" test_plaintext_check_output_fail || failed=`expr $failed + 1` testit "ntlm_auth ntlm-server-1 with fixed password" test_ntlm_server_1_check_output || failed=`expr $failed + 1` |