mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth plaintext authentication with failed 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:
committed by
Noel Power
parent
dfa149276f
commit
3794c1c527
@ -192,3 +192,16 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
|
||||
(out, err) = proc.communicate(input=creds.encode('utf-8'))
|
||||
self.assertEqual(proc.returncode, 0)
|
||||
self.assertTrue(out.startswith(b"OK\n"))
|
||||
|
||||
# Check membership failure
|
||||
proc = Popen([self.ntlm_auth_path,
|
||||
"--require-membership-of", self.bad_group_sid,
|
||||
"--helper-protocol", "squid-2.5-basic"],
|
||||
stdout=PIPE, stdin=PIPE, stderr=PIPE)
|
||||
creds = "%s%s%s %s\n" % (self.domain,
|
||||
self.winbind_separator,
|
||||
self.username,
|
||||
self.password)
|
||||
(out, err) = proc.communicate(input=creds.encode('utf-8'))
|
||||
self.assertEqual(proc.returncode, 0)
|
||||
self.assertTrue(out.startswith(b"ERR\n"))
|
||||
|
Reference in New Issue
Block a user