auth log: Add windows event codes
[amitay/samba.git] / python / samba / tests / auth_log_samlogon.py
index 00e105c..8abdc8d 100644 (file)
@@ -36,6 +36,7 @@ from samba.tests import delete_force
 from samba.dsdb import UF_WORKSTATION_TRUST_ACCOUNT, UF_PASSWD_NOTREQD
 from samba.dcerpc.misc import SEC_CHAN_WKSTA
 from samba.compat import text_type
+from samba.dcerpc.windows_event_ids import EVT_ID_SUCCESSFUL_LOGON
 
 
 class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase):
@@ -70,7 +71,8 @@ class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase):
                 msg["type"] == "Authentication" and
                 msg["Authentication"]["serviceDescription"]  == "SamLogon" and
                 msg["Authentication"]["authDescription"]     == "network" and
-                msg["Authentication"]["passwordType"]        == "NTLMv2")
+                msg["Authentication"]["passwordType"]        == "NTLMv2" and
+                msg["Authentication"]["eventId"] == EVT_ID_SUCCESSFUL_LOGON)
 
         if binding:
             binding = "[schannel,%s]" % binding