delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/05/19:35:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Stephen C. Biggs" <yyyyy50 AT hotpop DOT com>
To: "Harig, Mark A." <maharig AT idirect DOT net>, cygwin AT cygwin DOT com
Date: Mon, 05 Aug 2002 16:34:44 -0700
MIME-Version: 1.0
Subject: RE: Son of son of SSH & Cygwin; scp and sftp
Message-ID: <3D4EA924.1478.35BE2D4@localhost>
In-reply-to: <BADF3C947A1BD54FBA75C70C241B0B9E40F17A@ex02.idirect.net>

On 5 Aug 2002 at 18:39, Harig, Mark A. wrote:

> OK, i'm going to try this:
> 
> cygrunsrv -e "CYGWIN=glob ntsec binmode" \
> -d "Cygwin SSHD" \
> -p /usr/sbin/sshd.exe \
> -1 /var/log/sshd.log \
> -2 /var/log/sshd.log \
> -a "-e -D -ddd"
> 
> by the way, for what is worth, i've been using
> "CYGWIN=binmode ntsec tty".  I don't expect it
> to have any effect, but it's better not to assume.
> 
> Also, you might try simply using the output of
> "mkpasswd -l" to confirm that it has no effect.
> 

Ok... I did that and things changed.  Still didn't 
work, but it's different.  I've seen this before, 
also, and it seems to be related to the strange 
check in the code for returned length from 
'read' being <= 0 which is not an error if it is == 
0.  SSHD still closes the channel, though.  I had 
changed the code in a local version to not count 
this as an error but then it still failed with 
SIGCHLD received -- the child process dying 
without a whimper.

Here is the difference after the first line 
(SSHD):
debug1: fd 8 setting O_NONBLOCK
debug1: channel 0: read<=0 rfd 9 len 0
debug1: channel 0: read failed
debug1: channel 0: close_read
debug1: channel 0: input open -> drain
debug1: channel 0: ibuf empty
debug1: channel 0: send eof
debug1: channel 0: input drain -> closed
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 151
debug1: session_exit_message: session 0 
channel 0 pid 151
debug1: channel request 0: exit-status
debug1: session_exit_message: release 
channel 0
debug1: channel 0: write failed
debug1: channel 0: close_write
debug1: channel 0: output open -> closed
debug1: session_close: session 0 pid 151
debug1: session_pty_cleanup: session 0 
release /dev/tty2
syslogin_perform_logout: logout() returned an 
error
debug1: channel 0: send close
debug3: channel 0: will not send data after 
close
debug2: notify_done: reading
debug3: channel 0: will not send data after 
close
debug1: channel 0: rcvd close
debug3: channel 0: will not send data after 
close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: server-
session, nchannels 1
debug3: channel_free: status: The following 
connections are open:
  #0 server-session (t4 r0 i3/0 o3/0 fd -1/-1)

debug3: channel_close_fds: channel 0: r -1 w -
1 e -1
Connection closed by remote host.
Closing connection to 127.0.0.1

... and here is the changed output for SSH 
(which, by the way, now hangs and I have to kill 
the Cygwin console!) Notice that I got much 
further and it now prints out the MOTD before 
the server dumps the connection.  Some sort of 
weird race condition?  Why me?:

debug2: channel 0: rcvd adjust 131072
debug3: Trying to reverse map address 
127.0.0.1.
Last login: Mon Aug  5 15:30:47 2002 from 
localhost
Fanfare!!!
You are successfully logged in to this server!!!
setgid: Invalid argument
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 
rtype exit-status reply 0
debug1: channel 0: rcvd close
debug1: channel 0: close_read
debug1: channel 0: input open -> closed
debug3: channel 0: will not send data after 
close
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-
session, nchannels 1
debug3: channel_free: status: The following 
connections are open:
  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1)

debug3: channel_close_fds: channel 0: r -1 w -
1 e 6
Connection to localhost closed.
debug1: Transferred: stdin 0, stdout 0, stderr 33 
bytes in 4.5 seconds
debug1: Bytes per second: stdin 0.0, stdout 
0.0, stderr 7.3
debug1: Exit status 1


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019