[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Aug 1 17:00:02 UTC 2019


The branch, master has been updated
       via  4b88e1d997c tests/dcerpc/raw_protocol: Add more tests for DCERPC_AUTH_LEVEL_PACKET
       via  e0e68ea2551 tests/dcerpc/raw_protocol: split test_spnego_integrity_request into 2 parts
       via  ff2f20439c4 tests/dcerpc/raw_protocol: split test_spnego_connect_request() into 2 parts
      from  c226dc6e8a1 smbd: Fix use-after-free from exit_server_common()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4b88e1d997cdb39c4b4e71ea742168598fbb2dff
Author: Günther Deschner <gd at samba.org>
Date:   Wed Aug 31 15:55:10 2016 +0200

    tests/dcerpc/raw_protocol: Add more tests for DCERPC_AUTH_LEVEL_PACKET
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Aug  1 16:59:02 UTC 2019 on sn-devel-184

commit e0e68ea25514fdb05921eabec6a4cdd587a9844e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Aug 1 13:04:16 2019 +0200

    tests/dcerpc/raw_protocol: split test_spnego_integrity_request into 2 parts
    
    This can be a generic test that can be used for more auth_levels.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit ff2f20439c403340ec886bf31f055355dfbfcdbf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Aug 1 13:04:16 2019 +0200

    tests/dcerpc/raw_protocol: split test_spnego_connect_request() into 2 parts
    
    This can be a generic test that can be used for more auth_levels.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 python/samba/tests/dcerpc/raw_protocol.py | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py
index e2c45603d39..0bce5c82e42 100755
--- a/python/samba/tests/dcerpc/raw_protocol.py
+++ b/python/samba/tests/dcerpc/raw_protocol.py
@@ -1681,6 +1681,9 @@ class TestDCERPC_BIND(RawDCERPCTest):
     def test_auth_none_call_request(self):
         return self._test_auth_none_level_request(dcerpc.DCERPC_AUTH_LEVEL_CALL)
 
+    def test_auth_none_packet_request(self):
+        return self._test_auth_none_level_request(dcerpc.DCERPC_AUTH_LEVEL_PACKET)
+
     def _test_neg_xmit_check_values(self,
                                     req_xmit=None,
                                     req_recv=None,
@@ -2611,7 +2614,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
         self.assertIsNone(rep)
         self.assertNotConnected()
 
-    def test_spnego_connect_request(self):
+    def _test_spnego_connect_upgrade_request(self, upgrade_auth_level):
         ndr32 = base.transfer_syntax_ndr()
 
         tsf1_list = [ndr32]
@@ -2730,9 +2733,9 @@ class TestDCERPC_BIND(RawDCERPCTest):
         self.assertEquals(rep.u.cancel_count, 0)
         self.assertGreaterEqual(len(rep.u.stub_and_verifier), rep.u.alloc_hint)
 
-        # Now a request with auth_info DCERPC_AUTH_LEVEL_INTEGRITY
+        # Now a request with auth_info upgrade_auth_level
         auth_info = self.generate_auth(auth_type=auth_type,
-                                       auth_level=dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY,
+                                       auth_level=upgrade_auth_level,
                                        auth_context_id=auth_context_id,
                                        auth_blob=b"\x01" + b"\x00" * 15)
         req = self.generate_request(call_id=4,
@@ -2758,7 +2761,15 @@ class TestDCERPC_BIND(RawDCERPCTest):
         self.assertIsNone(rep)
         self.assertNotConnected()
 
-    def test_spnego_integrity_request(self):
+    def test_spnego_connect_packet_upgrade(self):
+        return self._test_spnego_connect_upgrade_request(
+                                        dcerpc.DCERPC_AUTH_LEVEL_PACKET)
+
+    def test_spnego_connect_integrity_upgrade(self):
+        return self._test_spnego_connect_upgrade_request(
+                                        dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY)
+
+    def _test_spnego_connect_downgrade_request(self, initial_auth_level):
         ndr32 = base.transfer_syntax_ndr()
 
         tsf1_list = [ndr32]
@@ -2774,7 +2785,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
         g.set_credentials(c)
         g.want_feature(gensec.FEATURE_DCE_STYLE)
         auth_type = dcerpc.DCERPC_AUTH_TYPE_SPNEGO
-        auth_level = dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY
+        auth_level = initial_auth_level
         auth_context_id = 2
         g.start_mech_by_authtype(auth_type, auth_level)
         from_server = b""
@@ -2871,6 +2882,14 @@ class TestDCERPC_BIND(RawDCERPCTest):
         self.assertIsNone(rep)
         self.assertNotConnected()
 
+    def test_spnego_packet_downgrade_connect(self):
+        return self._test_spnego_connect_downgrade_request(
+                                        dcerpc.DCERPC_AUTH_LEVEL_PACKET)
+
+    def test_spnego_integrity_downgrade_connect(self):
+        return self._test_spnego_connect_upgrade_request(
+                                        dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY)
+
     def test_spnego_unfinished_request(self):
         ndr32 = base.transfer_syntax_ndr()
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list