Skip to content
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

CLIENT:PAM: fixed missed return check #5317

Closed

Conversation

alexey-tikhonov
Copy link
Member

Return code of prompt_2fa() wasn't checked and
thus its fail wasn't properly processed.

Spotted with a help of following warning:

Error: CLANG_WARNING:
sssd-2.3.2/src/sss_client/pam_sss.c:2355:21: warning: Value stored to 'ret' is never read
 #                    ret = prompt_2fa(pamh, pi, _("First Factor (Current Password): "),
 #                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Return code of `prompt_2fa()` wasn't checked and
thus its fail wasn't properly processed.

Spotted with a help of following warning:
```
Error: CLANG_WARNING:
sssd-2.3.2/src/sss_client/pam_sss.c:2355:21: warning: Value stored to 'ret' is never read
 #                    ret = prompt_2fa(pamh, pi, _("First Factor (Current Password): "),
 #                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
@ikerexxe
Copy link
Contributor

LGTM

@pbrezina
Copy link
Member

Pushed PR: #5317

  • master
    • 67b3f37 - CLIENT:PAM: fixed missed return check

@pbrezina pbrezina added Pushed and removed Accepted Ready to push Ready to push labels Sep 17, 2020
@pbrezina pbrezina closed this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants