summaryrefslogtreecommitdiffstats
path: root/usr.bin/login
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1998-02-05 18:37:02 +0000
committerguido <guido@FreeBSD.org>1998-02-05 18:37:02 +0000
commitcf8c2edb0ea15a954f953b92615a6bdf5e1070c7 (patch)
tree4dfa54389c699edee92b7de8261d30aa16474f4c /usr.bin/login
parentb5c2c88df86a3d1e06296ee57694fb7f6aaed196 (diff)
downloadFreeBSD-src-cf8c2edb0ea15a954f953b92615a6bdf5e1070c7.zip
FreeBSD-src-cf8c2edb0ea15a954f953b92615a6bdf5e1070c7.tar.gz
Reset SGINT and SIGQUIT handling to default when asking for passwords.
Otherwise, when pressing the INT ke at the password prompt, the password will be displayed. Now login will be killed. Probably the same will have to be done for the LOGIN_CAP_AUTH case. I have not done that. Reviewed by: Joerg Wunsch
Diffstat (limited to 'usr.bin/login')
-rw-r--r--usr.bin/login/login.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index 5ed7998..b4d0282 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: login.c,v 1.29 1997/09/28 08:49:22 markm Exp $";
+ "$Id: login.c,v 1.30 1997/10/19 09:34:06 joerg Exp $";
#endif /* not lint */
/*
@@ -438,6 +438,8 @@ main(argc, argv)
}
}
#else /* !LOGIN_CAP_AUTH */
+ (void)signal(SIGINT, SIG_DFL);
+ (void)signal(SIGQUIT, SIG_DFL);
#ifdef SKEY
permit_passwd = skeyaccess(username, tty,
hostname ? full_hostname : NULL,
@@ -448,6 +450,8 @@ main(argc, argv)
p = getpass("Password:");
ep = crypt(p, salt);
#endif/* SKEY */
+ (void)signal(SIGINT, SIG_IGN);
+ (void)signal(SIGQUIT, SIG_IGN);
if (pwd) {
#ifdef KERBEROS
OpenPOWER on IntegriCloud