]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Allow tests to set SamLogon validation level
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 14 Dec 2022 23:17:13 +0000 (12:17 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Feb 2023 00:03:40 +0000 (00:03 +0000)
We'll want to test various levels to ensure they all behave as expected.

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 08c42d83aaee7d427d627634bcc455c820ba6109..4bf2db4f8389bc0103b29dfa1c4052f47d1e5c04 100644 (file)
@@ -2341,7 +2341,8 @@ class KDCBaseTest(RawKerberosTest):
 
     # Test SamLogon. Authentication should succeed for non-protected accounts,
     # and fail for protected accounts.
-    def _test_samlogon(self, creds, logon_type, protected):
+    def _test_samlogon(self, creds, logon_type, protected,
+                       validation_level=netlogon.NetlogonValidationSamInfo2):
         samdb = self.get_samdb()
 
         server = samdb.host_dns_name()
@@ -2408,7 +2409,6 @@ class KDCBaseTest(RawKerberosTest):
 
         logon.identity_info = identity_info
 
-        validation_level = netlogon.NetlogonValidationSamInfo2
         netr_flags = 0
 
         try: