summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-01-19 18:02:25 +0000
committerderaadt <deraadt@openbsd.org>2001-01-19 18:02:25 +0000
commitaf4f388a6efa017e35933b73e878ae829b5741d1 (patch)
treee93defeab48eaeb3358e55f5cdc0d04d0fe7053a
parentdo _exit() in exit handler, if it is a signal (diff)
downloadwireguard-openbsd-af4f388a6efa017e35933b73e878ae829b5741d1.tar.xz
wireguard-openbsd-af4f388a6efa017e35933b73e878ae829b5741d1.zip
mark remaining signal races
-rw-r--r--libexec/ftpd/ftpd.c7
-rw-r--r--libexec/getty/main.c9
2 files changed, 8 insertions, 8 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 97e8e9e18d7..e17dedd9595 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.89 2001/01/09 06:07:03 itojun Exp $ */
+/* $OpenBSD: ftpd.c,v 1.90 2001/01/19 18:02:25 deraadt Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -625,7 +625,7 @@ static void
lostconn(signo)
int signo;
{
-
+ /* XXX signal races */
if (debug)
syslog(LOG_DEBUG, "lost connection");
dologout(1);
@@ -635,8 +635,9 @@ static void
sigquit(signo)
int signo;
{
+
+ /* XXX signal races */
syslog(LOG_ERR, "got signal %s", strerror(signo));
-
dologout(1);
}
diff --git a/libexec/getty/main.c b/libexec/getty/main.c
index e4e43bcaaf4..00b0717dc68 100644
--- a/libexec/getty/main.c
+++ b/libexec/getty/main.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
-static char rcsid[] = "$Id: main.c,v 1.15 2000/09/07 17:02:23 deraadt Exp $";
+static char rcsid[] = "$Id: main.c,v 1.16 2001/01/19 18:02:26 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -130,10 +130,9 @@ jmp_buf timeout;
static void
dingdong()
{
-
alarm(0);
signal(SIGALRM, SIG_DFL);
- longjmp(timeout, 1);
+ longjmp(timeout, 1); /* XXX signal/longjmp resource leaks */
}
jmp_buf intrupt;
@@ -153,9 +152,9 @@ void
timeoverrun(signo)
int signo;
{
-
+ /* XXX signal race */
syslog(LOG_ERR, "getty exiting due to excessive running time");
- exit(1);
+ _exit(1);
}
static int getname __P((void));