Skip to content

Commit

Permalink
fix bug usecache
Browse files Browse the repository at this point in the history
  • Loading branch information
pyama86 committed Feb 20, 2020
1 parent 4583887 commit c092886
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (cli *CLI) run(config string, onlyURL bool, code []byte) error {
if err != nil {
goto web
}
fmt.Println("auth ok with cache token")
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion misc/run_ssh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
rsyslogd &
sleep 1
tail -f /var/log/syslog &
/usr/sbin/sshd -d
/usr/sbin/sshd -D
4 changes: 4 additions & 0 deletions pam/pam.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **ar
return PAM_AUTHINFO_UNAVAIL;
}

if (strcmp(res, "auth ok with cache token\n") == 0) {
// auth ok with cache token
return PAM_SUCCESS;
}
char *code = NULL;
code = request_pass(pamh, PAM_PROMPT_ECHO_OFF, res);
if (!code) {
Expand Down

0 comments on commit c092886

Please sign in to comment.