]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Remove unnecessary target_creds variables
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 19 Oct 2023 03:22:28 +0000 (16:22 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 24 Oct 2023 00:54:31 +0000 (00:54 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/conditional_ace_tests.py

index c478dfe00a8186599407ad7b04eb9fc4a593e3e2..d54931724d14873993f8c0095fb1eeb59c68724c 100755 (executable)
@@ -2924,11 +2924,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication fails.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt,
                              expected_error=KDC_ERR_POLICY)
 
@@ -2980,11 +2978,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication succeeds.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt)
 
         self.check_as_log(client_creds,
@@ -3031,11 +3027,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication fails.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt,
                              expected_error=KDC_ERR_POLICY)
 
@@ -3216,11 +3210,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication fails.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt,
                              expected_error=KDC_ERR_POLICY)
 
@@ -3315,11 +3307,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication fails.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt,
                              expected_error=KDC_ERR_POLICY)
 
@@ -3370,11 +3360,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication succeeds.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt)
 
         self.check_as_log(client_creds,
@@ -3426,11 +3414,9 @@ class DeviceRestrictionTests(ConditionalAceBaseTests):
         client_creds = self._get_creds(account_type=self.AccountType.USER,
                                        assigned_policy=client_policy)
 
-        target_creds = self.get_krbtgt_creds()
-
         # Show that authentication fails.
         self._armored_as_req(client_creds,
-                             target_creds,
+                             self.get_krbtgt_creds(),
                              mach_tgt,
                              expected_error=KDC_ERR_POLICY)