summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@suse.de>2018-08-31 19:28:06 +0200
committerNoel Power <npower@samba.org>2018-12-19 12:42:14 +0100
commit91c4f2603607a917c1f1006b2f9f83232ac489c4 (patch)
treec05f12d7add42661eb14fac1f7a9e380e1a89991 /source3
parent3ae7095bbee9ca19056c00a61084d49e5e278728 (diff)
downloadsamba-91c4f2603607a917c1f1006b2f9f83232ac489c4.tar.gz
tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth ntlm-server-1 with incorrect fixed password against winbind
Port ntlm_auth bash script tests to python and remove bash test script 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-xsource3/script/tests/test_ntlm_auth_s3.sh67
1 files changed, 0 insertions, 67 deletions
diff --git a/source3/script/tests/test_ntlm_auth_s3.sh b/source3/script/tests/test_ntlm_auth_s3.sh
deleted file mode 100755
index 041cb7d9cb8..00000000000
--- a/source3/script/tests/test_ntlm_auth_s3.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-if [ $# -lt 2 ]; then
-cat <<EOF
-Usage: test_ntlm_auth_s3.sh PYTHON SRC3DIR NTLM_AUTH
-EOF
-exit 1;
-fi
-
-PYTHON=$1
-SRC3DIR=$2
-NTLM_AUTH=$3
-DOMAIN=$4
-USERNAME=$5
-PASSWORD=$6
-shift 6
-ADDARGS="$*"
-
-incdir=`dirname $0`/../../../testprogs/blackbox
-. $incdir/subunit.sh
-
-SID=`eval $BINDIR/wbinfo -n $USERNAME | cut -d ' ' -f1`
-BADSID=`eval $BINDIR/wbinfo -n $USERNAME | cut -d ' ' -f1 | sed 's/..$//'`
-
-failed=0
-
-test_ntlm_server_1_check_winbind_output_fail()
-{
- tmpfile=$PREFIX/ntlm_commands
-
- # This isn't the correct password
- cat > $tmpfile <<EOF
-LANMAN-Challenge: 0123456789abcdef
-NT-Response: 25a98c1c31e81847466b29b2df4680f39958fb8c213a9cc6
-NT-Domain: $DOMAIN
-Username: $USERNAME
-Request-User-Session-Key: Yes
-.
-EOF
- cmd='$NTLM_AUTH "$@" --helper-protocol=ntlm-server-1 < $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: No" >/dev/null 2>&1
-
- if [ $? = 0 ] ; then
- # failed to authenticate .. success
- true
- else
- echo "incorrectly gave a successful authentication"
- false
- fi
-}
-
-# This should work even with NTLMv2
-testit "ntlm_auth ntlm-server-1 with incorrect fixed password against winbind" test_ntlm_server_1_check_winbind_output_fail || failed=`expr $failed + 1`
-
-testok $0 $failed