Date: Sat, 20 Jan 2001 01:03:02 -0800 From: David Bushong <david@bushong.net> To: Dima Dorfman <dima@unixfreak.org> Cc: freebsd-stable@freebsd.org Subject: Re: sshd with ssh -t problems Message-ID: <20010120010302.G16505@bushong.net> In-Reply-To: <20010120033439.20E773E02@bazooka.unixfreak.org>; from dima@unixfreak.org on Fri, Jan 19, 2001 at 07:34:34PM -0800 References: <david@bushong.net> <20010120033439.20E773E02@bazooka.unixfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > > <login behavior> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010120010302.G16505>