From 8ea795672d8063db2f474a4ac11a1b94f386096d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 1 Mar 2012 17:44:48 +1100 Subject: s3-selftest: make ntlm_auth test more robust to bad input If we do not know the helper protocol, make sure to error. Andrew Bartlett --- source3/torture/test_ntlm_auth.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/torture/test_ntlm_auth.py b/source3/torture/test_ntlm_auth.py index 386bfb7f0c..1ee5b83bd7 100755 --- a/source3/torture/test_ntlm_auth.py +++ b/source3/torture/test_ntlm_auth.py @@ -212,7 +212,7 @@ def main(): sys.exit(4) - if opts.client_helper == "ntlmssp-client-1" and opts.server_helper == "gss-spnego": + elif opts.client_helper == "ntlmssp-client-1" and opts.server_helper == "gss-spnego": # We're in the parent writeLine(client_out, "YR") buf = readLine(client_in) @@ -242,7 +242,7 @@ def main(): sys.exit(4) - if opts.client_helper == "gss-spnego-client" and opts.server_helper == "gss-spnego": + elif opts.client_helper == "gss-spnego-client" and opts.server_helper == "gss-spnego": # We're in the parent writeLine(server_out, "YR") buf = readLine(server_in) @@ -266,6 +266,9 @@ def main(): if buf.count("AF * ", 0, 5) == 1: break + else: + sys.exit(5) + if opts.client_helper == "ntlmssp-client-1": writeLine(client_out, "GK") buf = readLine(client_in) -- cgit