1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server against winbind 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>
This commit is contained in:
Samuel Cabrero 2018-08-31 17:46:59 +02:00 committed by Noel Power
parent 1f704496ea
commit 8d11a54e37
2 changed files with 13 additions and 2 deletions

View File

@ -148,3 +148,16 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
require_membership=self.group_sid,
server_use_winbind=True)
self.assertTrue(ret)
def test_require_membership_gss_spnego(self):
""" ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server
against winbind with require-membership-of """
ret = self.run_helper(client_username=self.username,
client_password=self.password,
client_domain=self.domain,
require_membership=self.group_sid,
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
testit "ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server against winbind with require-membership-of" $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 --require-membership-of=$SID || failed=`expr $failed + 1`
testit_expect_failure "ntlm_auth against winbindd with failed require-membership-of" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH --client-username=$USERNAME --client-domain=$DOMAIN --client-password=$PASSWORD --server-use-winbindd $ADDARGS --require-membership-of=$BADSID && failed=`expr $failed + 1`
testit_expect_failure "ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server against winbind with failed require-membership-of" $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 --require-membership-of=$BADSID && failed=`expr $failed + 1`