Subject: bin/31243: sshd uses pipes rather than socketpairs
To: None <firstname.lastname@example.org, email@example.com>
From: Mark Davies <firstname.lastname@example.org>
Date: 09/09/2005 07:55:00
>Synopsis: sshd uses pipes rather than socketpairs
>Arrival-Date: Fri Sep 09 07:54:59 +0000 2005
>Originator: Mark Davies
>Release: NetBSD 3.99.7
Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand.
System: NetBSD city-art.mcs.vuw.ac.nz 3.99.7 NetBSD 3.99.7 (MCS_WORKSTATION) #0: Mon Aug 15 16:21:55 NZST 2005 email@example.com:/mnt/SAVE/build.obj/src/work/src/sys/arch/i386/compile/MCS_WORKSTATION i386
For many years now bash has had code to check if its being invoked from
under an sshd/rshd and execute your .bashrc if it is. That code relies
on stdin being a socket.
We recently switched from using a pkgsrc compiled openssh on our NetBSD
boxes to using the intree one (as its now recent enough) and our bash
users started noticing that their .bashrc's were no longer being run.
ssh <netbsd-machine> lsof
and notice that the lsof file descriptor 0 is a pipe.
ssh <netbsd-machine> env
where the account on the remote machine has bash as its shell
and some environment variable is set in its .bashrc and notice
that the environment variable is not set in the env output.
Make the following change, well actually remove the line and the
preceeding comment entirely (on what NetBSD systems do socketpairs
not seem to work?).
RCS file: /src/cvs/netbsd/src/crypto/dist/ssh/includes.h,v
retrieving revision 1.9
diff -u -r1.9 includes.h
--- includes.h 13 Feb 2005 18:14:04 -0000 1.9
+++ includes.h 7 Sep 2005 12:32:45 -0000
@@ -68,6 +68,6 @@
* Define this to use pipes instead of socketpairs for communicating with the
* client program. Socketpairs do not seem to work on all systems.
-#define USE_PIPES 1
+/* #define USE_PIPES 1 */
#endif /* INCLUDES_H */