dsdb-audit: Remove flapping part of the tests
authorAndrew Bartlett <abartlet@samba.org>
Mon, 25 Jun 2018 20:29:46 +0000 (08:29 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 26 Jun 2018 01:27:20 +0000 (03:27 +0200)
Because we have tests for this in the auth audit code, we do not need to have
the complexity of checking that we got DCE/RPC over SMB as an authorization
message here.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
python/samba/tests/audit_log_dsdb.py

index 53d457374248f5faf76768fb15a0467de2ecd699..abcdb9dc41369e6a399c3843a3f543189ae94aa3 100644 (file)
@@ -150,8 +150,10 @@ class AuditLogDsdbTests(AuditLogTestBase):
                                  self.remoteAddress)
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
                                  self.remoteAddress)
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
-        service_description = self.get_service_description()
-        self.assertEquals(service_description, "DCE/RPC")
+        # We skip the check for self.get_service_description() as this
+        # is subject to a race between smbd and the s4 rpc_server code
+        # as to which will set the description as it is DCE/RPC over SMB
+
         self.assertTrue(self.is_guid(audit["transactionId"]))
 
         attributes = audit["attributes"]
         self.assertTrue(self.is_guid(audit["transactionId"]))
 
         attributes = audit["attributes"]
@@ -189,8 +191,10 @@ class AuditLogDsdbTests(AuditLogTestBase):
                                  self.remoteAddress)
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
                                  self.remoteAddress)
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
-        service_description = self.get_service_description()
-        self.assertEquals(service_description, "DCE/RPC")
+        # We skip the check for self.get_service_description() as this
+        # is subject to a race between smbd and the s4 rpc_server code
+        # as to which will set the description as it is DCE/RPC over SMB
+
         self.assertTrue(self.is_guid(audit["transactionId"]))
 
         attributes = audit["attributes"]
         self.assertTrue(self.is_guid(audit["transactionId"]))
 
         attributes = audit["attributes"]
@@ -434,8 +438,11 @@ class AuditLogDsdbTests(AuditLogTestBase):
         self.assertTrue(self.is_guid(audit["sessionId"]))
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
         self.assertTrue(self.is_guid(audit["sessionId"]))
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
-        service_description = self.get_service_description()
-        self.assertEquals(service_description, "DCE/RPC")
+
+        # We skip the check for self.get_service_description() as this
+        # is subject to a race between smbd and the s4 rpc_server code
+        # as to which will set the description as it is DCE/RPC over SMB
+
         attributes = audit["attributes"]
         self.assertEquals(2, len(attributes))
 
         attributes = audit["attributes"]
         self.assertEquals(2, len(attributes))
 
@@ -480,8 +487,11 @@ class AuditLogDsdbTests(AuditLogTestBase):
         self.assertTrue(self.is_guid(audit["sessionId"]))
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
         self.assertTrue(self.is_guid(audit["sessionId"]))
         session_id = self.get_session()
         self.assertEquals(session_id, audit["sessionId"])
-        service_description = self.get_service_description()
-        self.assertEquals(service_description, "DCE/RPC")
+
+        # We skip the check for self.get_service_description() as this
+        # is subject to a race between smbd and the s4 rpc_server code
+        # as to which will set the description as it is DCE/RPC over SMB
+
 
     def test_modify(self):
 
 
     def test_modify(self):