Skip to content

Commit 3d3ee42

Browse files
Matthew Hellerdaztucker
authored andcommitted
fix duplicate PAM msgs, missing loginmsg reset
without this change in mm_answer_pam_account all messages added in auth-pam.c sshpam_query(...) case PAM_SUCCESS end up sent here, then are still sitting in the loginmsg buffer and printed a second time in session.c do_login(...)
1 parent c8f6f38 commit 3d3ee42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

monitor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,7 @@ mm_answer_pam_account(struct ssh *ssh, int sock, struct sshbuf *m)
11291129
if ((r = sshbuf_put_u32(m, ret)) != 0 ||
11301130
(r = sshbuf_put_stringb(m, loginmsg)) != 0)
11311131
fatal_fr(r, "buffer error");
1132+
sshbuf_reset(loginmsg);
11321133

11331134
mm_request_send(sock, MONITOR_ANS_PAM_ACCOUNT, m);
11341135

0 commit comments

Comments
 (0)