This is a discussion on Re: [PATCH] openssh pseudo-terminal bug within the OpenSSH Development forums, part of the Networking and Network Related category; --Boundary-00=_QBPmEqZF9G2HJjl Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline > ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--Boundary-00=_QBPmEqZF9G2HJjl
Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline > RITZ, Daniel wrote: > > attached is a diff between the server logs on hostB when connecting with > > commercial > > ssh (-) and when connection with openssh (+). > > Your diff was stripped by the mailing list software (it only accepts > attachments that are of MIME-type text/*). Could you please resend it > or create a bug at http://bugzilla.mindrot.org/ and attach it? > ok, next try with a sane mailer...the log diff as attachement, the patch inline... rgds -daniel --- openssh-4.3p2/ttymodes.c~ 2006-06-19 17:39:52.000000000 +0200 +++ openssh-4.3p2/ttymodes.c 2006-06-19 17:41:30.000000000 +0200 @@ -292,6 +292,9 @@ } if (tiop == NULL) { + if (fd == -1) + goto end; + if (tcgetattr(fd, &tio) == -1) { logit("tcgetattr: %.100s", strerror(errno)); goto end; --- openssh-4.3p2/clientloop.c~ 2006-06-19 17:27:58.000000000 +0200 +++ openssh-4.3p2/clientloop.c 2006-06-19 17:38:22.000000000 +0200 @@ -1862,6 +1862,7 @@ if (want_tty) { struct winsize ws; struct termios tio; + struct termios *tmptiop = NULL; /* Store window size in the packet. */ if (ioctl(in_fd, TIOCGWINSZ, &ws) < 0) @@ -1873,8 +1874,14 @@ packet_put_int(ws.ws_row); packet_put_int(ws.ws_xpixel); packet_put_int(ws.ws_ypixel); - tio = get_saved_tio(); - tty_make_modes(-1, tiop != NULL ? tiop : &tio); + + tmptiop = tiop; + if ((tmptiop == NULL) && get_saved_tio_valid()) { + tio = get_saved_tio(); + tmptiop = &tio; + } + + tty_make_modes(-1, tmptiop); packet_send(); /* XXX wait for reply */ c->client_tty = 1; --- openssh-4.3p2/sshpty.h~ 2006-06-19 17:32:21.000000000 +0200 +++ openssh-4.3p2/sshpty.h 2006-06-19 17:32:43.000000000 +0200 @@ -17,6 +17,7 @@ #ifndef SSHPTY_H #define SSHPTY_H +int get_saved_tio_valid(void); struct termios get_saved_tio(void); void leave_raw_mode(void); void enter_raw_mode(void); --- openssh-4.3p2/sshtty.c~ 2006-06-19 17:29:53.000000000 +0200 +++ openssh-4.3p2/sshtty.c 2006-06-19 17:31:29.000000000 +0200 @@ -40,9 +40,16 @@ #include "sshpty.h" #include "log.h" +static int _saved_tio_valid; static struct termios _saved_tio; static int _in_raw_mode = 0; + +int get_saved_tio_valid(void) +{ + return _saved_tio_valid; +} + struct termios get_saved_tio(void) { @@ -70,6 +77,7 @@ return; } _saved_tio = tio; + _saved_tio_valid = 1; tio.c_iflag |= IGNPAR; tio.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF); #ifdef IUCLC --Boundary-00=_QBPmEqZF9G2HJjl Content-Type: text/x-diff; charset="us-ascii"; name="log-com-open.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="log-com-open.diff" --- log-comssh 2006-06-19 15:54:54.000000000 +0200 +++ log-openssh 2006-06-19 15:54:54.000000000 +0200 @@ -39,9 +39,9 @@ debug1: read PEM private key done: type DSA debug1: private host key: #2 type 2 DSA debug1: inetd sockets after dupping: 4, 4 -Connection from 192.168.41.221 port 3028 -debug1: Client protocol version 1.99; client software version 3.2.0 SSH Secure Shell Tru64 UNIX -debug1: no match: 3.2.0 SSH Secure Shell Tru64 UNIX +Connection from 192.168.41.41 port 61175 +debug1: Client protocol version 2.0; client software version Sun_SSH_1.1 +debug1: no match: Sun_SSH_1.1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-1.99-OpenSSH_4.3 debug2: fd 4 setting O_NONBLOCK @@ -258,13 +234,66 @@ debug3: mm_answer_pty entering debug1: session_new: init debug1: session_new: session 0 -debug3: Trying to reverse map address 192.168.41.221. +debug3: Trying to reverse map address 192.168.41.41. debug3: mm_request_send entering: type 26 debug3: mm_answer_pty: tty /dev/pts/8 ptyfd 5 -debug1: session_pty_req: session 0 alloc /dev/pts/8 debug3: mm_request_receive entering -debug3: tty_parse_modes: SSH2 n_bytes 1 -debug1: server_input_channel_req: channel 0 request exec reply 1 +debug1: session_pty_req: session 0 alloc /dev/pts/8 +debug3: tty_parse_modes: SSH2 n_bytes 266 +debug3: tty_parse_modes: ospeed 0 +debug3: tty_parse_modes: ispeed 0 +debug3: tty_parse_modes: 1 0 +debug3: tty_parse_modes: 2 0 +debug3: tty_parse_modes: 3 0 +debug3: tty_parse_modes: 4 0 +debug3: tty_parse_modes: 5 0 +debug3: tty_parse_modes: 6 0 +debug3: tty_parse_modes: 7 0 +debug3: tty_parse_modes: 8 0 +debug3: tty_parse_modes: 9 0 +debug3: tty_parse_modes: 10 0 +debug3: tty_parse_modes: 11 0 +debug3: tty_parse_modes: 12 0 +debug3: tty_parse_modes: 13 0 +debug3: tty_parse_modes: 14 0 +debug3: tty_parse_modes: 16 0 +debug3: tty_parse_modes: 18 0 +debug3: tty_parse_modes: 30 0 +debug3: tty_parse_modes: 31 0 +debug3: tty_parse_modes: 32 0 +debug3: tty_parse_modes: 33 0 +debug3: tty_parse_modes: 34 0 +debug3: tty_parse_modes: 35 0 +debug3: tty_parse_modes: 36 0 +debug3: tty_parse_modes: 37 0 +debug3: tty_parse_modes: 38 0 +debug3: tty_parse_modes: 39 0 +debug3: tty_parse_modes: 40 0 +debug3: tty_parse_modes: 41 0 +debug3: tty_parse_modes: 50 0 +debug3: tty_parse_modes: 51 0 +debug3: tty_parse_modes: 52 0 +debug3: tty_parse_modes: 53 0 +debug3: tty_parse_modes: 54 0 +debug3: tty_parse_modes: 55 0 +debug3: tty_parse_modes: 56 0 +debug3: tty_parse_modes: 57 0 +debug3: tty_parse_modes: 58 0 +debug3: tty_parse_modes: 59 0 +debug3: tty_parse_modes: 60 0 +debug3: tty_parse_modes: 61 0 +debug3: tty_parse_modes: 62 0 +debug3: tty_parse_modes: 70 0 +debug3: tty_parse_modes: 71 0 +debug3: tty_parse_modes: 72 0 +debug3: tty_parse_modes: 73 0 +debug3: tty_parse_modes: 74 0 +debug3: tty_parse_modes: 75 0 +debug3: tty_parse_modes: 90 0 +debug3: tty_parse_modes: 91 0 +debug3: tty_parse_modes: 92 0 +debug3: tty_parse_modes: 93 0 +debug1: server_input_channel_req: channel 0 request exec reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req exec debug2: fd 4 setting TCP_NODELAY --Boundary-00=_QBPmEqZF9G2HJjl Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org http://www.mindrot.org/mailman/listi...enssh-unix-dev --Boundary-00=_QBPmEqZF9G2HJjl-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|