Skip to content

Commit

Permalink
fix duplicate PAM msgs, missing loginmsg reset
Browse files Browse the repository at this point in the history
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(...)
  • Loading branch information
Matthew Heller authored and Matthew Heller committed Oct 16, 2024
1 parent c537eeb commit 2f55f92
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ mm_answer_pam_account(struct ssh *ssh, int sock, struct sshbuf *m)
if ((r = sshbuf_put_u32(m, ret)) != 0 ||
(r = sshbuf_put_stringb(m, loginmsg)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
sshbuf_reset(loginmsg);

mm_request_send(sock, MONITOR_ANS_PAM_ACCOUNT, m);

Expand Down

0 comments on commit 2f55f92

Please sign in to comment.