From owner-freebsd-stable Sat Jan 20 1: 3:26 2001 Delivered-To: freebsd-stable@freebsd.org Received: from firebat.bushong.net (c128625-a.frmt1.sfba.home.com [24.176.225.90]) by hub.freebsd.org (Postfix) with ESMTP id D330037B401 for ; Sat, 20 Jan 2001 01:03:06 -0800 (PST) Received: (from dbushong@localhost) by firebat.bushong.net (8.11.0/8.11.0) id f0K932M53560; Sat, 20 Jan 2001 01:03:02 -0800 (PST) (envelope-from dbushong) Date: Sat, 20 Jan 2001 01:03:02 -0800 From: David Bushong To: Dima Dorfman Cc: freebsd-stable@freebsd.org Subject: Re: sshd with ssh -t problems Message-ID: <20010120010302.G16505@bushong.net> References: <20010120033439.20E773E02@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010120033439.20E773E02@bazooka.unixfreak.org>; from dima@unixfreak.org on Fri, Jan 19, 2001 at 07:34:34PM -0800 X-Floating-Sheep-Port: 0xbaa Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yup, that fixed it. Thanks! BTW, in most source trees, doing the "make" in /usr/src/secure/usr.sbin/sshd will give you an sshd binary in /usr/obj/usr/src/secure/usr.sbin/sshd (depending on your paths, of course) Thanks again, --David Bushong On Fri, Jan 19, 2001 at 07:34:34PM -0800, Dima Dorfman wrote: > > Not sure if someone else has run into this, but with 4.2-STABLE circa > > 1/16/2000's sshd I get the following behavior: > > > > othermachine% ssh -t 4.2stable-box ls > > > > 4.2stable-box% > > I can reproduce this. The problem was introduced in OpenSSH 2.3.0, > which was recently MFC'd. > > The patch below fixes the problem. I did *very* little testing on it, > as the only host I have with -current (and thus, openssh 2.3.0) makes > no substansial use of ssh. > > The problem is that the routine checks to see if a command was > specified so it won't do things like print the motd if you're not > running a shell, but fails to propogate it back to the rest of the > program, which then assumes none was specified. In fact, I can't see > why it compiles without warnings in the first place: the function is > supposed to return a (char *), but the line I replaced clearly doesn't > do that. > > The patch applies against src/crypto/openssh/session.c. To get a new > sshd, you can either do a make world, or, if you don't have a fast CPU > (which I don't, FWIW), you can run `make` in src/secure/lib/libssh and > src/secure/usr.sbin/sshd, which will produce > src/secure/usr.sbin/sshd/sshd. > > It would be nice if you could do some testing and report back. If > there are no problems, I'll submit it to the OpenSSH people (if they > haven't already fixed it). > > Thanks > > Dima Dorfman > dima@unixfreak.org > > Index: session.c > =================================================================== > RCS file: /st/src/FreeBSD/src/crypto/openssh/session.c,v > retrieving revision 1.12 > diff -u -r1.12 session.c > --- session.c 2000/12/06 10:55:44 1.12 > +++ session.c 2001/01/20 03:29:26 > @@ -705,7 +705,7 @@ > > /* Done if .hushlogin exists or a command given. */ > if (command != NULL) > - return; > + return newcommand; > snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir); > #ifdef HAVE_LOGIN_CAP > lc = login_getpwclass(pw); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message