1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server 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>
This commit is contained in:
Samuel Cabrero
2018-08-31 16:42:05 +02:00
committed by Noel Power
parent c9a5bf3c82
commit 4ce9371f5f
2 changed files with 12 additions and 2 deletions

View File

@ -102,3 +102,15 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
server_helper="gss-spnego", server_helper="gss-spnego",
server_use_winbind=False) server_use_winbind=False)
self.assertTrue(ret) self.assertTrue(ret)
def test_gss_spnego_winbind(self):
""" ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server
against winbind """
ret = self.run_helper(client_username=self.username,
client_password=self.password,
client_domain=self.domain,
client_helper="gss-spnego-client",
server_helper="gss-spnego",
server_use_winbind=True)
self.assertTrue(ret)

View File

@ -269,8 +269,6 @@ EOF
} }
# This should work even with NTLMv2 # This should work even with NTLMv2
testit "ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server against winbind" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH --client-username=$USERNAME --client-domain=$DOMAIN --client-password=$PASSWORD --server-use-winbindd --client-helper=gss-spnego-client --server-helper=gss-spnego $ADDARGS || failed=`expr $failed + 1`
testit "wbinfo store cached credentials" $BINDIR/wbinfo --ccache-save=$DOMAIN/$USERNAME%$PASSWORD || failed=`expr $failed + 1` testit "wbinfo store cached credentials" $BINDIR/wbinfo --ccache-save=$DOMAIN/$USERNAME%$PASSWORD || failed=`expr $failed + 1`
testit "ntlm_auth ccached credentials with NTLMSSP client and gss-spnego server" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH $ADDARGS --client-username=$USERNAME --client-domain=$DOMAIN --client-use-cached-creds --client-helper=ntlmssp-client-1 --server-helper=gss-spnego --server-use-winbindd || failed=`expr $failed + 1` testit "ntlm_auth ccached credentials with NTLMSSP client and gss-spnego server" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH $ADDARGS --client-username=$USERNAME --client-domain=$DOMAIN --client-use-cached-creds --client-helper=ntlmssp-client-1 --server-helper=gss-spnego --server-use-winbindd || failed=`expr $failed + 1`