New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PAM: user feedback when login fails due to blocked PIN #6162
Conversation
|
Tested manually: |
src/responder/pam/pamsrv_cmd.c
Outdated
| @@ -1072,6 +1072,11 @@ static void pam_reply(struct pam_auth_req *preq) | |||
| pam_account_expired_message); | |||
| } | |||
|
|
|||
| if (pd->pam_status == PAM_MAXTRIES) { | |||
| pd->pam_status = PAM_AUTH_ERR; | |||
| inform_user(pd, SSS_PAM_USER_INFO_PIN_LOCKED, "PIN locked"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sumit-bose, does this message need a localization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing is, probably it's not worth providing this string from sssd_pam to sss_client at all. It could be hard-coded in sss_client...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
sorry for the delay. Yes, I think it is a good idea to have a localization for this string and as a consequence it would be better to just send the type and let pam_sss generate the message, in the locale of the calling environment, similar to SSS_PAM_USER_INFO_OTP_CHPASS and user_info_otp_chpass().
bye,
Sumit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM.
4e1a1b2
to
68f03e1
Compare
|
Hi, thank you for the updates, you accidentally added translation files to the commit. Additionally I wonder if it wouldn't be easier to call bye, |
Hm, but I did this intentionally: since patch adds new
That's better, right. I didn't know it was possible. Thanks. |
Or do I need to commit only |
Hi, I think this should be sufficient but I'm currently not sure how translations are handled. I remember some long time ago we had some string-freeze, say 4 weeks before a release, where the pot file was updates and pushed upstream so that translators could add there contributions which were then pulled in before the release was done. But currently it look like the pot file is updated directly before a release. @pbrezina, do you have any details here? bye, |
This is exactly my intention, because this is last planned patch that touches strings in 2.7.z series. I don't know if |
68f03e1
to
02bf9bb
Compare
Done in the latest version. I also dropped all po-files updates per agreement with @pbrezina. |
02bf9bb
to
dbc27f0
Compare
|
Rebased. |
|
Covscan complains: But I don't think it's worth addressing. There is no action to take in case |
|
(Requesting re-review by @justin-stephenson because patch was changed.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functionality works as expected.
[justin@agalloch yubikey]$ yubico-piv-tool -a verify -P 000000
Pin verification failed, 2 tries left before pin is blocked.
[justin@agalloch yubikey]$ yubico-piv-tool -a verify -P 000000
Pin verification failed, 1 tries left before pin is blocked.
[justin@agalloch yubikey]$ yubico-piv-tool -a verify -P 000000
Pin code blocked, use unblock-pin action to unblock.
[justin@agalloch yubikey]$ su - test
PIN for test:
PIN locked
su: Authentication failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
code looks good and my test were successful as well, ACK.
bye,
Sumit
|
Pushed PR: #6162
|
Resolves: #6153