diff options
| author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-06-14 15:28:39 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2023-06-14 22:57:35 +0000 |
| commit | d1fcecd1214eba0dc8bcaca72cc889d209b7f716 (patch) | |
| tree | b5f9b72f7cef6cd78fd6da3d508741d60dc9a937 /python/samba | |
| parent | 11671a743fe914a0abbee2326cbd8df359d50beb (diff) | |
| download | samba-d1fcecd1214eba0dc8bcaca72cc889d209b7f716.tar.gz samba-d1fcecd1214eba0dc8bcaca72cc889d209b7f716.tar.bz2 samba-d1fcecd1214eba0dc8bcaca72cc889d209b7f716.zip | |
tests/auth_log: Properly expect authentication failures
These authentications are actually failing (due to RESPONSE_TOO_BIG
errors), but our authentication logging infrastructure hides this.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba')
| -rwxr-xr-x | python/samba/tests/auth_log.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/python/samba/tests/auth_log.py b/python/samba/tests/auth_log.py index 462e22af62c..98ab4603f98 100755 --- a/python/samba/tests/auth_log.py +++ b/python/samba/tests/auth_log.py @@ -176,13 +176,14 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase): # returning message too big, msg = messages[0] self.assertEqual("Authentication", msg["type"]) - self.assertEqual("NT_STATUS_OK", msg["Authentication"]["status"]) + self.assertEqual("NT_STATUS_PROTOCOL_UNREACHABLE", # RESPONSE_TOO_BIG + msg["Authentication"]["status"]) self.assertEqual("Kerberos KDC", msg["Authentication"]["serviceDescription"]) self.assertEqual(authTypes[1], msg["Authentication"]["authDescription"]) self.assertEqual( - EVT_ID_SUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) + EVT_ID_UNSUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) self.assertEqual( EVT_LOGON_NETWORK, msg["Authentication"]["logonType"]) @@ -372,13 +373,14 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase): # Check the second message it should be an Authentication msg = messages[1] self.assertEqual("Authentication", msg["type"]) - self.assertEqual("NT_STATUS_OK", msg["Authentication"]["status"]) + self.assertEqual("NT_STATUS_PROTOCOL_UNREACHABLE", # RESPONSE_TOO_BIG + msg["Authentication"]["status"]) self.assertEqual("Kerberos KDC", msg["Authentication"]["serviceDescription"]) self.assertEqual(authTypes[2], msg["Authentication"]["authDescription"]) self.assertEqual( - EVT_ID_SUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) + EVT_ID_UNSUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) self.assertEqual( EVT_LOGON_NETWORK, msg["Authentication"]["logonType"]) @@ -491,14 +493,15 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase): # Check the first message it should be an Authentication msg = messages[0] self.assertEqual("Authentication", msg["type"]) - self.assertEqual("NT_STATUS_OK", msg["Authentication"]["status"]) + self.assertEqual("NT_STATUS_PROTOCOL_UNREACHABLE", # RESPONSE_TOO_BIG + msg["Authentication"]["status"]) self.assertEqual("Kerberos KDC", msg["Authentication"]["serviceDescription"]) self.assertEqual("ENC-TS Pre-authentication", msg["Authentication"]["authDescription"]) self.assertTrue(msg["Authentication"]["duration"] > 0) self.assertEqual( - EVT_ID_SUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) + EVT_ID_UNSUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) self.assertEqual( EVT_LOGON_NETWORK, msg["Authentication"]["logonType"]) @@ -735,12 +738,13 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase): # Check the first message it should be an Authentication msg = messages[0] self.assertEqual("Authentication", msg["type"]) - self.assertEqual("NT_STATUS_OK", msg["Authentication"]["status"]) + self.assertEqual("NT_STATUS_PROTOCOL_UNREACHABLE", # RESPONSE_TOO_BIG + msg["Authentication"]["status"]) self.assertEqual("Kerberos KDC", msg["Authentication"]["serviceDescription"]) self.assertEqual("ENC-TS Pre-authentication", msg["Authentication"]["authDescription"]) - self.assertEqual(EVT_ID_SUCCESSFUL_LOGON, + self.assertEqual(EVT_ID_UNSUCCESSFUL_LOGON, msg["Authentication"]["eventId"]) self.assertEqual(EVT_LOGON_NETWORK, msg["Authentication"]["logonType"]) |
