[PATCH] Add second authentication to make sure we're not locked out

Stefan Metzmacher metze at samba.org
Thu Feb 22 16:37:49 UTC 2018


Am 22.02.2018 um 17:33 schrieb Andreas Schneider via samba-technical:
> +
> +    # check that we are not locked out with just one failed login
> +    def test_authenticate_two(self):
> +        domain = os.environ["DOMAIN"]
> +        username = os.environ["USERNAME"]
> +        password = os.environ["PASSWORD"]
> +        unix_username = "%s/%s" % (domain, username)
> +        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)
> -- 

I only see one check here...
If you indent to check twice please do so within one test.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180222/4725ecf2/signature.sig>


More information about the samba-technical mailing list