From 6368af8260ec7dd74349eabb48d1312385e0ad49 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 Feb 2018 17:30:36 +0100 Subject: [PATCH] tests: Authenticate again so make sure we are not locked out Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- python/samba/tests/pam_winbind.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/samba/tests/pam_winbind.py b/python/samba/tests/pam_winbind.py index 1054e86dc9d..d64600e8566 100644 --- a/python/samba/tests/pam_winbind.py +++ b/python/samba/tests/pam_winbind.py @@ -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) -- 2.34.1