tests/krb5: Have modified_ticket() not modify its arguments
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 28 Aug 2023 01:52:47 +0000 (13:52 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 Aug 2023 02:15:29 +0000 (02:15 +0000)
Inexplicable behaviour could result when the same arguments were passed
in across multiple calls.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/raw_testcase.py

index 8d578bb0b899775ebeaa0f94acec306ed1e1be32..536803e7a1fb3507cbb1549a27a49ff837d8f62d 100644 (file)
@@ -5551,6 +5551,8 @@ class RawKerberosTest(TestCase):
             # A dict containing a key for each checksum type to be created in
             # the PAC.
             checksum_keys = {}
+        else:
+            checksum_keys = dict(checksum_keys)
 
         if include_checksums is None:
             # A dict containing a value for each checksum type; True if the
@@ -5558,6 +5560,8 @@ class RawKerberosTest(TestCase):
             # excluded, or None/not present if the checksum is to be included
             # based on its presence in the original PAC.
             include_checksums = {}
+        else:
+            include_checksums = dict(include_checksums)
 
         # Check that the values passed in by the caller make sense.