]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Fix type errors by giving ‘pwd_last_set’ an appropriate type
authorJo Sutton <josutton@catalyst.net.nz>
Thu, 16 May 2024 02:41:17 +0000 (14:41 +1200)
committerMartin Schwenke <martins@samba.org>
Tue, 2 Jul 2024 03:39:35 +0000 (03:39 +0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Martin Schwenke <martin@meltin.net>
python/samba/tests/krb5/pkinit_tests.py

index 1c87b041ad269750ea6c319771f6de03fe6f7223..4783b125c959bacb51328b274dc93db6b2e9b9e1 100755 (executable)
@@ -39,7 +39,7 @@ import ldb
 import samba.tests
 from samba import credentials, generate_random_password, ntstatus
 from samba.nt_time import (nt_time_delta_from_timedelta,
-                           nt_now, string_from_nt_time)
+                           nt_now, NtTime, string_from_nt_time)
 from samba.dcerpc import security, netlogon
 from samba.dsdb import UF_PASSWORD_EXPIRED, UF_DONT_EXPIRE_PASSWD
 from samba.tests.pso import PasswordSettings
@@ -1218,7 +1218,7 @@ class PkInitTests(KDCBaseTest):
             self._test_samlogon(creds=client_creds,
                                 logon_type=netlogon.NetlogonNetworkInformation)
 
-        pwd_last_set = int(res[0]["pwdLastSet"][0])
+        pwd_last_set = NtTime(int(res[0]["pwdLastSet"][0]))
         self.assertGreater(pwd_last_set, 0)
 
         # This just checks the value is sensible