Skip to content

Commit c092886

Browse files
author
pyama86
committed
fix bug usecache
1 parent 4583887 commit c092886

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

cli.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func (cli *CLI) run(config string, onlyURL bool, code []byte) error {
104104
if err != nil {
105105
goto web
106106
}
107+
fmt.Println("auth ok with cache token")
107108
}
108109

109110
return nil

misc/run_ssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
rsyslogd &
33
sleep 1
44
tail -f /var/log/syslog &
5-
/usr/sbin/sshd -d
5+
/usr/sbin/sshd -D

pam/pam.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **ar
133133
return PAM_AUTHINFO_UNAVAIL;
134134
}
135135

136+
if (strcmp(res, "auth ok with cache token\n") == 0) {
137+
// auth ok with cache token
138+
return PAM_SUCCESS;
139+
}
136140
char *code = NULL;
137141
code = request_pass(pamh, PAM_PROMPT_ECHO_OFF, res);
138142
if (!code) {

0 commit comments

Comments
 (0)