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

Alter nouserok behaviour from PAM_SUCCESS to PAM_IGNORE #321

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ disable this functionality, like so: `authpending_file=`. Default value:
/var/run/user/$UID/pam-u2f-authpending

nouserok::
Set to enable authentication attempts to succeed even if the user
trying to authenticate is not found inside `authfile` or if `authfile`
is missing/malformed.
Set to allow authentication attempts to continue to other authentication
methods even if the user trying to authenticate is not found inside
`authfile` or if `authfile` is missing/malformed. (returns PAM_IGNORE)

openasuser::
Setuid to the authenticating user when opening the authfile. Useful
Expand Down
2 changes: 1 addition & 1 deletion pam-u2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
if (cfg->nouserok) {
debug_dbg(cfg, "Found no devices but nouserok specified. Skipping "
"authentication");
retval = PAM_SUCCESS;
retval = PAM_IGNORE;
goto done;
} else if (retval != 1) {
debug_dbg(cfg, "Unable to get devices from authentication file");
Expand Down