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

[Documentatin][Enhancement] Add PAM return codes emitted by pam_u2f to documentation #320

Open
nagmat84 opened this issue Nov 3, 2024 · 1 comment

Comments

@nagmat84
Copy link

nagmat84 commented Nov 3, 2024

Please add which returns codes pam_u2f can emit to the documentation of pam_u2f at https://developers.yubico.com/pam-u2f/Manuals/pam_u2f.8.html and to the man pages. This should also contain a brief description what return code pam_u2f used in which case.

From reading the main source file I was able to compile this preliminary list:

  • PAM_IGNORE:
    • unable to allocate memory (side remark: shouldn't this be PAM_ABORT or PAM_BUF_ERROR?)
    • could not resolve authfile path
    • unable to switch user to uid
    • could not restore privilege
  • PAM_CONV_ERR
    • unable to get user name from PAM
  • PAM_USER_UNKNOWN
    • unable to retrieve credentials for user
  • PAM_AUTHINFO_UNAVAIL`
    • failed to perform variable expansion
    • unable to get devices from authentication file
    • found no devices
  • PAM_SUCCESS
    • found no devices but nouserok specified
  • PAM_AUTH_ERR`

Note: This list incomplete, because I did not dive into the helper functions get_devices_from_authfile, do_authentication and do_manual_authentication. I compiled this list only from the main file pam-u2f.c.

@LDVG
Copy link
Contributor

LDVG commented Nov 4, 2024

Thank you for your suggestion. I also believe we could do better in these regards. We'll look into it when we get the time, patches welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants