Hi, ssh using protocol 1 checks whether there is an EOF comming on stdin to avoid problems on some platforms that select() doesn't wake up when redirected from /dev/null. In my case, a POSIX system, this handle is useful and avoids also select() complaining agains using /dev/null. So checking EOF comming on stdin prevents two possible problems: dont't wake up of select() and select() complaining agains using /dev/null. EOF comes immediate from stdin when using -n option or when stdin is redirected to /dev/null (</dev/null). ssh using protocol 2 doesn't handle EOF comming on stdin then the avobe two problems are present. Cheers, Ignasi Roca Fujitsu-Siemens Computers.
Created attachment 589 [details] Add check EOF comming on stdin at session_setup time for protocol 2
Comment on attachment 589 [details] Add check EOF comming on stdin at session_setup time for protocol 2 It is not correct. It fails compiling channels.c
Created attachment 590 [details] Add check EOF comming on stdin at session_setup time for protocol 2
Hello, I'm trying to install the patch you created and am having some difficulties. I'm patching on a RH8 box using the command "patch <channels.patch" I'm getting the error: -- snip -- (Stripping trailing CRs from patch.) patching file channels.c patch: **** malformed patch at line 100: } -- snip -- Any idea what I'm doing wrong when applying the patch??
This might be a candidate for portable only, because this select() bug doesn't seem to exist on OpenBSD.
The fix for bug 85 should help here - ssh/sshd should half-close the channel (and propagate this to the far end) now. Can you retest?
As I mentioned in comment #6, I'm pretty sure that this bug is closed. Please reopen if this is not the case.
Mass update RESOLVED->CLOSED after release of openssh-5.1