summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-02-22 17:30:36 +0100
committerAndrew Bartlett <abartlet@samba.org>2018-02-24 10:54:07 +0100
commit6368af8260ec7dd74349eabb48d1312385e0ad49 (patch)
tree0956257fcf5b1b131b01061ea3e7c72cc904da74 /python
parent3b0a940c39e94f57457fd612721b1296d9752e57 (diff)
downloadsamba-6368af8260ec7dd74349eabb48d1312385e0ad49.tar.gz
tests: Authenticate again so make sure we are not locked out
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/pam_winbind.py10
1 files changed, 10 insertions, 0 deletions
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)