summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@suse.de>2018-08-31 19:15:05 +0200
committerNoel Power <npower@samba.org>2018-12-19 12:42:13 +0100
commit8d4258f43dea153cc60a6b9dbd36f0ca0b5abf0e (patch)
treeb22a9bdd6c7fd7651bd2459790ae57381474cd40 /source3/script
parent7c0c683b2eafc6f5c8474a4547d970ad3ce5a759 (diff)
downloadsamba-8d4258f43dea153cc60a6b9dbd36f0ca0b5abf0e.tar.gz
tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth ntlm-server-1 with plaintext password against winbind
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/script')
-rwxr-xr-xsource3/script/tests/test_ntlm_auth_s3.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/source3/script/tests/test_ntlm_auth_s3.sh b/source3/script/tests/test_ntlm_auth_s3.sh
index b41368c4e3b..4048b804be2 100755
--- a/source3/script/tests/test_ntlm_auth_s3.sh
+++ b/source3/script/tests/test_ntlm_auth_s3.sh
@@ -24,42 +24,6 @@ BADSID=`eval $BINDIR/wbinfo -n $USERNAME | cut -d ' ' -f1 | sed 's/..$//'`
failed=0
-test_ntlm_server_1_check_winbind_output()
-{
- tmpfile=$PREFIX/ntlm_commands
-
- # This isn't the correct password
- cat > $tmpfile <<EOF
-Password: $PASSWORD
-NT-Domain: $DOMAIN
-Username: $USERNAME
-Request-User-Session-Key: Yes
-.
-EOF
- cmd='$NTLM_AUTH "$@" --helper-protocol=ntlm-server-1 --require-membership-of=$SID < $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 "Authenticated: Yes" >/dev/null 2>&1
-
- if [ $? = 0 ] ; then
- # authenticated .. success
- true
- else
- echo "Failed to authenticate the user or match with SID $SID"
- false
- fi
-}
-
test_ntlm_server_1_check_winbind_output_wrong_sid()
{
tmpfile=$PREFIX/ntlm_commands
@@ -134,7 +98,6 @@ EOF
}
# This should work even with NTLMv2
-testit "ntlm_auth ntlm-server-1 with plaintext password against winbind" test_ntlm_server_1_check_winbind_output || failed=`expr $failed + 1`
testit "ntlm_auth ntlm-server-1 with plaintext password against winbind but wrong sid" test_ntlm_server_1_check_winbind_output_wrong_sid || failed=`expr $failed + 1`
testit "ntlm_auth ntlm-server-1 with incorrect fixed password against winbind" test_ntlm_server_1_check_winbind_output_fail || failed=`expr $failed + 1`