From owner-cvs-all Wed Jun 26 16:26:44 2002 Delivered-To: cvs-all@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 2434537B701; Wed, 26 Jun 2002 15:57:47 -0700 (PDT) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.4/8.12.3) with ESMTP id g5QMHEYB002229; Thu, 27 Jun 2002 02:17:19 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.4/8.12.3/Submit) id g5QMHBZG002228; Thu, 27 Jun 2002 02:17:11 +0400 (MSD) (envelope-from ache) Date: Thu, 27 Jun 2002 02:17:09 +0400 From: "Andrey A. Chernov" To: Dag-Erling Smorgrav Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/crypto/openssh-portable session.c Message-ID: <20020626221708.GA2178@nagual.pp.ru> References: <200206261417.g5QEHTjR074759@freefall.freebsd.org> <20020626152357.GA30110@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jun 26, 2002 at 23:59:09 +0200, Dag-Erling Smorgrav wrote: > "Andrey A. Chernov" writes: > > About PATH: it seems that you expect that setusercontext() will set it, > > but setusercontext() can fail (its return code currently not checked, but > > was checked in our old code). It leaves code flow with no PATH. Better to > > set PATH before it & check its return code too. I am not sure about > > failure reaction, it can be fatal or just warning. > > Yes, that's a good point. The original code also assumes > setusercontext(3) will succeed, and copies the parent's PATH to the > child - but if setusercontext(3) failed, PATH might be anything (what > if sshd was started manually from a shell?) It should use a > compiled-in fallback instead. BTW, it seems we have a bug in our login(1), login.c - new code does setenv(PATH...) _after_ setusercontext(), it means path= command in standard /etc/login.conf will not works. > I disagree. The "term" variable is a fallback. You are right. I withdraw my notice about TERM. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message