mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
pam_fprintd: Just return a PAM_AUTH_ERROR on unknown errors
If something under the hood failed with a generic device error we'd just mark the PAM module not available, this is probably too much as it may just be due to a device temporary error. So make it stop but allow the loading system to retry with it
This commit is contained in:
@ -565,7 +565,7 @@ do_verify (sd_bus *bus,
|
||||
}
|
||||
else if (str_equal (data->result, "verify-unknown-error"))
|
||||
{
|
||||
return PAM_AUTHINFO_UNAVAIL;
|
||||
return PAM_AUTH_ERR;
|
||||
}
|
||||
else if (str_equal (data->result, "verify-disconnected"))
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ class TestPamFprintd(dbusmock.DBusTestCase):
|
||||
]
|
||||
self.device_mock.SetVerifyScript(script)
|
||||
|
||||
tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rv=PAM_AUTHINFO_UNAVAIL)
|
||||
tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rv=PAM_AUTH_ERR)
|
||||
res = pypamtest.run_pamtest("toto", "fprintd-pam-test", [tc], [ 'unused' ])
|
||||
|
||||
self.assertRegex(res.info[0], r'Swipe your left little finger across the fingerprint reader')
|
||||
|
||||
Reference in New Issue
Block a user