]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Allow creating a target server account with or without compound ID support
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 3 Mar 2023 00:24:17 +0000 (13:24 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Mar 2023 04:39:32 +0000 (04:39 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/kdc_base_test.py

index 9b528eba7f29fced5c5263fd35f29c3940a0c4da..6500a188972aecea36bb705851fa86f7d8b6331a 100644 (file)
@@ -1849,8 +1849,15 @@ class KDCBaseTest(RawKerberosTest):
     # Get the credentials and server principal name of either the krbtgt, or a
     # specially created account, with resource SID compression either supported
     # or unsupported.
-    def get_target(self, to_krbtgt, *, compression=None, extra_enctypes=0):
+    def get_target(self,
+                   to_krbtgt, *,
+                   compound_id=None,
+                   compression=None,
+                   extra_enctypes=0):
         if to_krbtgt:
+            self.assertIsNone(compound_id,
+                              "it's no good specifying compound id support "
+                              "for the krbtgt")
             self.assertIsNone(compression,
                               "it's no good specifying compression support "
                               "for the krbtgt")
@@ -1867,6 +1874,7 @@ class KDCBaseTest(RawKerberosTest):
                         security.KERB_ENCTYPE_RC4_HMAC_MD5 |
                         security.KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 |
                         extra_enctypes,
+                    'compound_id_support': compound_id,
                     'sid_compression_support': compression,
                 })
             target_name = creds.get_username()