Bug 223482 - [patch] Prevent OpenSSH from overwriting last line of remote output when conn. is closed
[patch] Prevent OpenSSH from overwriting last line of remote output when conn...
Product: Fedora
Classification: Fedora
Component: openssh (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2007-01-19 11:59 EST by k3dzngrp8w2xtc9
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-26 18:25:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description k3dzngrp8w2xtc9 2007-01-19 11:59:47 EST
Description of problem:
OpenSSH overwrites the last line of output from the remote server when the
connection is closed.

Version-Release number of selected component (if applicable):
Against openssh-4.3p2-noacss.tar.bz2 in openssh-4.3p2-14.fc6.src.rpm  

Additional info: (patch)

diff -aurp openssh-4.3p2.orig/clientloop.c openssh-4.3p2/clientloop.c
--- openssh-4.3p2.orig/clientloop.c     2005-12-31 06:22:32.000000000 +0100
+++ openssh-4.3p2/clientloop.c  2007-01-19 17:44:52.000000000 +0100
@@ -1518,7 +1518,7 @@ client_loop(int have_pty, int escape_cha
         * that the connection has been closed.
        if (have_pty && options.log_level != SYSLOG_LEVEL_QUIET) {
-               snprintf(buf, sizeof buf, "Connection to %.64s closed.\r\n", host);
+               snprintf(buf, sizeof buf, "\r\nConnection to %.64s closed.\r\n",
                buffer_append(&stderr_buffer, buf, strlen(buf));
Comment 1 Tomas Mraz 2007-01-26 15:51:21 EST
Can you give exact steps how to reproduce the problem?
Comment 2 k3dzngrp8w2xtc9 2007-01-26 17:58:34 EST
$ ssh -x demo@gein.vistech.net
# ...
demo@gein.vistech.net's password: << Log in with password "user"
# ...
GEIN $ logoff
Connection to gein.vistech.net closed.07 22:53:05.35

The "Connection to gein.vistech.net closed." overwrites the message from server.
Comment 3 k3dzngrp8w2xtc9 2007-01-26 18:06:19 EST
Sorry probably I accidentally unset the NEEDINFO....
Comment 4 k3dzngrp8w2xtc9 2007-01-26 18:11:37 EST
By the way telnet also does this:

GEIN $ logoff
Connection closed by foreign host.N-2007 23:10:28.72
Comment 5 k3dzngrp8w2xtc9 2007-01-26 18:17:20 EST
So actually.. probably it's fair to say the bug is in the VMS audit subsystem
because it terminates the line with a \r or maybe in the terminal emulator, but
not ssh or telnet
Comment 6 Tomas Mraz 2007-01-26 18:25:42 EST
Yes, that seems to be the case.

Note You need to log in before you can comment on or make changes to this bug.