[Bug 1750] Sftp hangs if stderr is used.
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Thu Apr 8 22:20:07 EST 2010
https://bugzilla.mindrot.org/show_bug.cgi?id=1750
jchadima at redhat.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jchadima at redhat.com
--- Comment #2 from jchadima at redhat.com 2010-04-08 22:20:06 EST ---
(In reply to comment #1)
> When you say "session.c before version 1.237" do you mean that 1.237 is
> affected?
yes all versions from 1.237 are affected, all older aren't
Also, are you using the version from portable OpenSSH CVS or
> from OpenBSD CVS?
portable openssh.
The problem is in this chunk of the patch:
@@ -507,6 +507,10 @@
*/
if (compat20) {
session_set_fds(s, inout[1], inout[1], s->is_subsystem ? -1 : err[1]);
+ /* close err[1] to not leak the socket if this inside a subsystem */
+ if (s->is_subsystem) {
+ close(err[1]);
+ }
} else {
server_loop(pid, inout[1], inout[1], err[1]);
/* server_loop has closed inout[1] and err[1]. */
and another one for pipes also.
the stderr is closed and any attempt to write to it causes the hang.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
More information about the openssh-bugs
mailing list