tests: Authenticate again so make sure we are not locked out
authorAndreas Schneider <asn@samba.org>
Thu, 22 Feb 2018 16:30:36 +0000 (17:30 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 24 Feb 2018 09:54:07 +0000 (10:54 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/pam_winbind.py

index 1054e86dc9d45e90e7b79387bfeaecb413199a12..d64600e8566e57b85796be073428b13a31ce6b5e 100644 (file)
@@ -44,3 +44,13 @@ class SimplePamTests(samba.tests.TestCase):
         res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
 
         self.assertTrue(res != None)
+
+        # Authenticate again to check that we are not locked out with just one
+        # failed login
+        password = os.environ["PASSWORD"]
+        expected_rc = 0 # PAM_SUCCESS
+
+        tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rc)
+        res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
+
+        self.assertTrue(res != None)