]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dsdb/tests: let password_lockout.py cross-check the lastLogon value with samr
authorStefan Metzmacher <metze@samba.org>
Fri, 5 Feb 2016 07:37:53 +0000 (08:37 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Jun 2016 01:30:24 +0000 (03:30 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/tests/python/password_lockout.py

index 962741d78ca68e4569d3f0d271332518e416bee8..430431cf60dee88d16de1aadbeeb53412e27f584 100755 (executable)
@@ -226,6 +226,8 @@ userAccountControl: %d
         self._check_attribute(res, "msDS-User-Account-Control-Computed",
                               msDSUserAccountControlComputed)
 
+        lastLogon = int(res[0]["lastLogon"][0])
+
         samr_user = self._open_samr_user(res)
         uinfo3 = self.samr.QueryUserInfo(samr_user, 3)
         uinfo5 = self.samr.QueryUserInfo(samr_user, 5)
@@ -253,14 +255,17 @@ userAccountControl: %d
 
         self.assertEquals(uinfo3.acct_flags, expected_acb_info)
         self.assertEquals(uinfo3.bad_password_count, expected_bad_password_count)
+        self.assertEquals(uinfo3.last_logon, lastLogon)
 
         self.assertEquals(uinfo5.acct_flags, expected_acb_info)
         self.assertEquals(uinfo5.bad_password_count, effective_bad_password_count)
+        self.assertEquals(uinfo5.last_logon, lastLogon)
 
         self.assertEquals(uinfo16.acct_flags, expected_acb_info)
 
         self.assertEquals(uinfo21.acct_flags, expected_acb_info)
         self.assertEquals(uinfo21.bad_password_count, effective_bad_password_count)
+        self.assertEquals(uinfo21.last_logon, lastLogon)
 
         # check LDAP again and make sure the samr.QueryUserInfo
         # doesn't have any impact.