diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-12-06 05:37:05 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-12-06 05:37:05 +0000 |
commit | 356637a543a91c28362353168555fdfe110d4bf6 (patch) | |
tree | 46d0fd327ae800eb18c864b71276bc3c86af616f /libexec/login_chpass/login_chpass.c | |
parent | 7379aa77a00dba03363eb1419cf4ae4e335d830f (diff) |
Do not set handler for SIGINT and SIGQUIT to SIG_IGN since it prevents
getpass()/readpassphrase() from being able to restore the tty mode
on keyboard interrupt. Along with the recent readpassphrase.c commit
this means that if you ^C things that use login scripts (like su(1))
with a non-CBREAK shell your tty mode will be restored nicely.
TODO:
The various login scripts need to install handlers to avoid leaving
turd files or otherwise ending in a bad state. It would also be
nice to send BI_REJECT to the back channel.
Diffstat (limited to 'libexec/login_chpass/login_chpass.c')
-rw-r--r-- | libexec/login_chpass/login_chpass.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libexec/login_chpass/login_chpass.c b/libexec/login_chpass/login_chpass.c index a3ef0a0d20e..72e8ed93829 100644 --- a/libexec/login_chpass/login_chpass.c +++ b/libexec/login_chpass/login_chpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_chpass.c,v 1.2 2001/10/24 13:06:35 mpech Exp $ */ +/* $OpenBSD: login_chpass.c,v 1.3 2001/12/06 05:37:03 millert Exp $ */ /*- * Copyright (c) 1995,1996 Berkeley Software Design, Inc. All rights reserved. @@ -99,8 +99,6 @@ main(argc, argv) rl.rlim_max = 0; (void)setrlimit(RLIMIT_CORE, &rl); - (void)signal(SIGQUIT, SIG_IGN); - (void)signal(SIGINT, SIG_IGN); (void)setpriority(PRIO_PROCESS, 0, 0); openlog("login", LOG_ODELAY, LOG_AUTH); |