Bug 223482 - [patch] Prevent OpenSSH from overwriting last line of remote output when conn. is closed
Summary: [patch] Prevent OpenSSH from overwriting last line of remote output when conn...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 6
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-19 16:59 UTC by k3dzngrp8w2xtc9
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-26 23:25:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description k3dzngrp8w2xtc9 2007-01-19 16:59:47 UTC
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",
host);
                buffer_append(&stderr_buffer, buf, strlen(buf));
        }

Comment 1 Tomas Mraz 2007-01-26 20:51:21 UTC
Can you give exact steps how to reproduce the problem?


Comment 2 k3dzngrp8w2xtc9 2007-01-26 22:58:34 UTC
$ ssh -x demo.net
# ...
demo.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 23:06:19 UTC
Sorry probably I accidentally unset the NEEDINFO....

Comment 4 k3dzngrp8w2xtc9 2007-01-26 23:11:37 UTC
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 23:17:20 UTC
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 23:25:42 UTC
Yes, that seems to be the case.



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