From owner-cvs-all Tue May 22 2:35:34 2001 Delivered-To: cvs-all@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [212.61.40.17]) by hub.freebsd.org (Postfix) with ESMTP id 9F8B537B422; Tue, 22 May 2001 02:35:27 -0700 (PDT) (envelope-from guido@gvr.org) Received: by gvr.gvr.org (Postfix, from userid 657) id BE01E5848; Tue, 22 May 2001 11:35:25 +0200 (CEST) Date: Tue, 22 May 2001 11:35:25 +0200 From: Guido van Rooij To: "Andrey A. Chernov" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/login login.c Message-ID: <20010522113525.A14158@gvr.gvr.org> References: <200105212020.f4LKK0o39061@freefall.freebsd.org> <20010522114153.B32742@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010522114153.B32742@nagual.pp.ru>; from ache@nagual.pp.ru on Tue, May 22, 2001 at 11:41:53AM +0400 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 Tue, May 22, 2001 at 11:41:53AM +0400, Andrey A. Chernov wrote: > On Mon, May 21, 2001 at 13:20:00 -0700, Guido van Rooij wrote: > > guido 2001/05/21 13:20:00 PDT > > > > Modified files: > > usr.bin/login login.c > > Log: > > Disable SIGHUP while getting the login name. > > Why? > And what happens now if signal comes (line break f.e.) at this moment, > hang forever? No. The code will move on untill, in getloginname(), getchar() will return eof. Then (at least when username is set), a log record will be created specifying a failed login occurred. When SIGHUP is not disabled, this log record will never be created unless the person (program?) that tried to log on is kindly enough to end his sessions with a ctrl-d. -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message