mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-07 18:54:20 +01:00
Fixes issue where if the challenge-response cannot be updated, the incorrect error message is displayed
If the PAM module cannot update the challenge response file (due to permissions errors, usually), the incorrect error message is displayed "Error communicating with YubiKey...". This patch makes it so the correct error message is sent to the PAM client, which makes resolving this issue a lot easier.
This commit is contained in:
parent
2b0756b5de
commit
413037c7e5
@ -678,6 +678,7 @@ do_challenge_response(pam_handle_t *pamh, struct cfg *cfg, const char *username)
|
||||
/*
|
||||
* Write the challenge and response we will expect the next time to the state file.
|
||||
*/
|
||||
errstr = "Error updating YubiKey challenge, please check syslog or contact your system administrator";
|
||||
if (response_len > sizeof(state.response)) {
|
||||
DBG("Got too long response ??? (%u/%zu)", response_len, sizeof(state.response));
|
||||
goto out;
|
||||
@ -723,7 +724,6 @@ do_challenge_response(pam_handle_t *pamh, struct cfg *cfg, const char *username)
|
||||
goto restpriv_out;
|
||||
}
|
||||
|
||||
errstr = "Error updating YubiKey challenge, please check syslog or contact your system administrator";
|
||||
if (! write_chalresp_state (f, &state))
|
||||
goto out;
|
||||
if (fclose(f) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user