Skip to content
Merged
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: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
openssh (1:9.9p2-0deepin6) unstable; urgency=medium

* fix duplicate output.

-- xinpeng.wang <wangxinpeng@uniontech.com> Fri, 15 May 2026 16:27:44 +0800

openssh (1:9.9p2-0deepin5) unstable; urgency=medium

* Apply patches from upstream:
Expand Down
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ add-sm-support.patch
0035-upstream-Improve-rules-for-expansion-of-username.patch
0036-upstream-don-t-allow-0-characters-in-url-encoded-str.patch
0037-Add-more-username-validity-checks.patch
uniontech-fix-duplicate-loginmsg.patch
32 changes: 32 additions & 0 deletions debian/patches/uniontech-fix-duplicate-loginmsg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From: Lu Peilong <lupeilong@uniontech.com>
Subject: [PATCH] Fix duplicate PAM Text Info message on SSH login

Bug: 333423

Root cause:
In privilege separation mode, the monitor process sends loginmsg
(PAM_TEXT_INFO) to the child process twice:

1. mm_answer_pam_account() sends loginmsg via MONITOR_ANS_PAM_ACCOUNT
(used as SSH2_MSG_USERAUTH_BANNER during auth phase)
2. mm_answer_pty() sends loginmsg again during session setup
(displayed via PTY by display_loginmsg() in session.c)

After mm_answer_pam_account() sends the loginmsg, it does not reset
the buffer, so the PTY setup sends the same content again, resulting
in duplicate "验证成功" messages on the client.

Fix:
Add sshbuf_reset(loginmsg) after mm_request_send() in
mm_answer_pam_account() so the message is only sent once.

--- a/monitor.c
+++ b/monitor.c
@@ -1085,6 +1085,7 @@ mm_answer_pam_account(struct ssh *ssh, int sock, struct sshbuf *m)
fatal("%s: buffer error: %s", __func__, ssh_err(r));

mm_request_send(sock, MONITOR_ANS_PAM_ACCOUNT, m);
+ sshbuf_reset(loginmsg);

return (ret);
}
Loading