Date: Fri, 29 Dec 1995 10:59:04 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Cc: wollman@lcs.mit.edu, pst@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/gen getpass.c Message-ID: <199512290959.KAA10015@uriah.heep.sax.de> In-Reply-To: <199512282218.OAA12618@precipice.shockwave.com> from "Paul Traina" at Dec 28, 95 02:18:15 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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" <wollman@lcs.mit.edu> > > 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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512290959.KAA10015>