Bug 1563 - USE_PIPES unconditionally set in session.c
Summary: USE_PIPES unconditionally set in session.c
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 5.2p1
Hardware: Other Other
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 06:33 AEDT by Richard E. Silverman
Modified: 2011-01-24 12:33 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard E. Silverman 2009-02-26 06:33:51 AEDT
In this commit:

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/session.c?rev=1.238;content-type=text%2Fx-cvsweb-markup

... the USE_PIPES code was unconditionally turned on with an explicit "#define USE_PIPES".  This makes it impossible to turn off via the normal configuration mechanism (configure.ac).

Actually, it might be a good idea to add a configure option for this (configure --with-pipes), since there are tradeoffs involved in its use: the shutdown-read/SIGPIPE behavior verses the problem of some bash versions reading .bashrc and some not.
Comment 1 Damien Miller 2009-02-26 23:37:06 AEDT
We use pipes in session.c to support the "half-closed for reading" extension (see http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL?rev=1.12;content-type=text%2Fx-cvsweb-markup;ln=1#l34) since socketpairs don't reliably provide the signalling that we need on all OS's.

bash's behaviour has been incorrect pretty much all along; pipes vs. socketpairs has been a per-platform decision in OpenSSH for some years. IMO it would be better to fix bash.
Comment 2 Damien Miller 2010-06-18 13:13:27 AEST
It looks like most Linux distributions are shipping fixed bash by now, so I'll close this bug.
Comment 3 Damien Miller 2011-01-24 12:33:39 AEDT
Move resolved bugs to CLOSED after 5.7 release