From owner-freebsd-current Fri Dec 29 03:21:12 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA14854 for current-outgoing; Fri, 29 Dec 1995 03:21:12 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id DAA14849 Fri, 29 Dec 1995 03:21:05 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id MAA25797; Fri, 29 Dec 1995 12:21:02 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id MAA22997; Fri, 29 Dec 1995 12:20:57 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id KAA10015; Fri, 29 Dec 1995 10:59:04 +0100 (MET) From: J Wunsch Message-Id: <199512290959.KAA10015@uriah.heep.sax.de> Subject: Re: cvs commit: src/lib/libc/gen getpass.c To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Fri, 29 Dec 1995 10:59:04 +0100 (MET) Cc: wollman@lcs.mit.edu, pst@FreeBSD.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199512282218.OAA12618@precipice.shockwave.com> from "Paul Traina" at Dec 28, 95 02:18:15 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-current@FreeBSD.org Precedence: bulk As Paul Traina wrote: > > Two points: > (a) you two just changed the semantics of this routine, you need to check > all of the callers to make sure THEY block SIGINT and SIGTSTP. > (b) This is a bad idea if you use ^C or ^Z as part of your password, which > was legal. > From: "Garrett A. Wollman" > > Don't block SIGINT in getpass(3); this doesn't make sense. > > It shouldn't block SIGTSTP, either. (The calling program should if > it's important.) Paul: * Where have you been on Dec 10, when i've been asking in -current (Subject: getpass() and SIGINT) whether somebody objects? * No, this hasn't changed the behaviour of getpass() in accepting any of the signalling characters; they had to be quoted with ^V (or whatever your lnext character is set to) anyway, as well as for example ^\. The only change is that the ^C interpretation is now immediate, while you first had to press enter in order to see the effect of you intr previously. Garrett: * No, _blocking_ the signals isn't the right thing to do in any case. It has only been done to avoid the tty hassles involved (turning echo on/off). Well, i just noticed that we should install a SIGINT handler anyway (i didn't notice this on tcsh since it's restoring the old tty settings itself, but it's very obvious if you interrupt a `su' attempt right now, say on plain ol' csh). So it's perhaps a good idea to also install handlers for SIGTSTP and SIGCONT as well, in which case we could also avoid to block SIGTSTP. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)