pam: Fix PAM authentication when it's the last try

We need to make sure that the max_tries variable isn't decremented
further when we have success in the verification loop. Add missing break
to do that.

Fixes: affffaf134
Closes: #40
This commit is contained in:
Bastien Nocera
2020-02-04 13:46:15 +01:00
parent 319d859107
commit f745c49112

View File

@ -417,6 +417,7 @@ do_verify (pam_handle_t *pamh,
ret = PAM_AUTH_ERR; ret = PAM_AUTH_ERR;
} else if (str_equal (data->result, "verify-match")) { } else if (str_equal (data->result, "verify-match")) {
ret = PAM_SUCCESS; ret = PAM_SUCCESS;
break;
} else if (str_equal (data->result, "verify-unknown-error")) { } else if (str_equal (data->result, "verify-unknown-error")) {
ret = PAM_AUTHINFO_UNAVAIL; ret = PAM_AUTHINFO_UNAVAIL;
} else if (str_equal (data->result, "verify-disconnected")) { } else if (str_equal (data->result, "verify-disconnected")) {