summaryrefslogtreecommitdiff
path: root/python/samba/tests/auth_log_ncalrpc.py
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2018-12-13 10:20:28 +1300
committerAndrew Bartlett <abartlet@samba.org>2018-12-14 18:57:52 +0100
commitb7baf96bd7248b1d34416e3ae86f4613c5ed0934 (patch)
treecb36bd98a15cc007f9759f26ab03d86f6609a6a2 /python/samba/tests/auth_log_ncalrpc.py
parentcb23a0345f1ef4297f6643c25ebe955b9aaee54c (diff)
downloadsamba-b7baf96bd7248b1d34416e3ae86f4613c5ed0934.tar.gz
auth log: Add windows event codes
Add a new "eventId" element to the Authorisation JSON log messages. This contains a Windows Event Code Id either: 4624 Successful logon 4625 Unsuccessful logon Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/tests/auth_log_ncalrpc.py')
-rw-r--r--python/samba/tests/auth_log_ncalrpc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/samba/tests/auth_log_ncalrpc.py b/python/samba/tests/auth_log_ncalrpc.py
index 849cee7a409..7d6e3a13728 100644
--- a/python/samba/tests/auth_log_ncalrpc.py
+++ b/python/samba/tests/auth_log_ncalrpc.py
@@ -23,6 +23,7 @@ from samba.credentials import DONT_USE_KERBEROS
from samba.dcerpc.dcerpc import AS_SYSTEM_MAGIC_PATH_TOKEN
from samba.dcerpc import samr
import samba.tests.auth_log_base
+from samba.dcerpc.windows_event_ids import EVT_ID_SUCCESSFUL_LOGON
class AuthLogTestsNcalrpc(samba.tests.auth_log_base.AuthLogTestBase):
@@ -75,6 +76,8 @@ class AuthLogTestsNcalrpc(samba.tests.auth_log_base.AuthLogTestBase):
msg["Authentication"]["serviceDescription"])
self.assertEquals(authTypes[2],
msg["Authentication"]["authDescription"])
+ self.assertEquals(EVT_ID_SUCCESSFUL_LOGON,
+ msg["Authentication"]["eventId"])
def test_ncalrpc_ntlm_dns_sign(self):