summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-19 17:57:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-19 17:57:44 +0000
commit14ed877776dcefece53d3ac792a4ed18ba7dd630 (patch)
treefcf291d1c7d9372b55a7c7ea822fd7af5d252b5d
parenteaea12ff4f8a5979f9851fdd77caf066fec82cb6 (diff)
mark signal races i cannot fix at the moment
-rw-r--r--sbin/dump/dumprmt.c4
-rw-r--r--sbin/dump/optr.c5
-rw-r--r--sbin/dump/tape.c5
-rw-r--r--sbin/fsck_ext2fs/utilities.c7
-rw-r--r--sbin/fsck_ffs/utilities.c7
-rw-r--r--sbin/init/init.c6
-rw-r--r--sbin/mount_portal/mount_portal.c8
-rw-r--r--sbin/nfsd/nfsd.c4
-rw-r--r--sbin/restore/interactive.c10
-rw-r--r--sbin/routed/main.c6
-rw-r--r--sbin/shutdown/shutdown.c6
11 files changed, 38 insertions, 30 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c
index 3b659391c4a..aebb2a392db 100644
--- a/sbin/dump/dumprmt.c
+++ b/sbin/dump/dumprmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dumprmt.c,v 1.13 2000/01/22 20:24:54 deraadt Exp $ */
+/* $OpenBSD: dumprmt.c,v 1.14 2001/01/19 17:57:34 deraadt Exp $ */
/* $NetBSD: dumprmt.c,v 1.17 1997/06/05 16:10:47 mrg Exp $ */
/*-
@@ -113,7 +113,7 @@ rmthost(host)
static void
rmtconnaborted()
{
-
+ /* XXX signal race */
errx(X_ABORT, "Lost connection to remote host.");
}
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 275d7afa22f..f8a33ea68df 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optr.c,v 1.16 1997/08/05 23:17:11 angelos Exp $ */
+/* $OpenBSD: optr.c,v 1.17 2001/01/19 17:57:34 deraadt Exp $ */
/* $NetBSD: optr.c,v 1.11 1997/05/27 08:34:36 mrg Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94";
#else
-static char rcsid[] = "$OpenBSD: optr.c,v 1.16 1997/08/05 23:17:11 angelos Exp $";
+static char rcsid[] = "$OpenBSD: optr.c,v 1.17 2001/01/19 17:57:34 deraadt Exp $";
#endif
#endif /* not lint */
@@ -142,6 +142,7 @@ char lastmsg[BUFSIZ];
/*
* Alert the console operator, and enable the alarm clock to
* sleep for 2 minutes in case nobody comes to satisfy dump
+ * XXX not safe
*/
void
alarmcatch()
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c
index a9b1914f745..bfeb9509ae9 100644
--- a/sbin/dump/tape.c
+++ b/sbin/dump/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.10 1999/02/28 06:50:14 deraadt Exp $ */
+/* $OpenBSD: tape.c,v 1.11 2001/01/19 17:57:35 deraadt Exp $ */
/* $NetBSD: tape.c,v 1.11 1997/06/05 11:13:26 lukem Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.2 (Berkeley) 3/17/94";
#else
-static char rcsid[] = "$OpenBSD: tape.c,v 1.10 1999/02/28 06:50:14 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: tape.c,v 1.11 2001/01/19 17:57:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -272,6 +272,7 @@ do_stats()
* statussig --
* information message upon receipt of SIGINFO
* (derived from optr.c::timeest())
+ * XXX not safe
*/
void
statussig(notused)
diff --git a/sbin/fsck_ext2fs/utilities.c b/sbin/fsck_ext2fs/utilities.c
index 80b784e044a..d2a6befb88c 100644
--- a/sbin/fsck_ext2fs/utilities.c
+++ b/sbin/fsck_ext2fs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.6 2000/09/30 16:06:34 aaron Exp $ */
+/* $OpenBSD: utilities.c,v 1.7 2001/01/19 17:57:36 deraadt Exp $ */
/* $NetBSD: utilities.c,v 1.1 1997/06/11 11:22:02 bouyer Exp $ */
/*
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
#if 0
static char rcsid[] = "$NetBSD: utilities.c,v 1.1 1997/06/11 11:22:02 bouyer Exp $";
#else
-static char rcsid[] = "$OpenBSD: utilities.c,v 1.6 2000/09/30 16:06:34 aaron Exp $";
+static char rcsid[] = "$OpenBSD: utilities.c,v 1.7 2001/01/19 17:57:36 deraadt Exp $";
#endif
#endif
#endif /* not lint */
@@ -466,6 +466,7 @@ void
catch(n)
int n;
{
+ /* XXX signal race */
ckfini(0);
exit(12);
}
@@ -481,6 +482,7 @@ catchquit(n)
{
extern returntosingle;
+ /* XXX signal race */
printf("returning to single-user after filesystem check\n");
returntosingle = 1;
(void)signal(SIGQUIT, SIG_DFL);
@@ -495,6 +497,7 @@ voidquit(n)
int n;
{
+ /* XXX signal race */
sleep(1);
(void)signal(SIGQUIT, SIG_IGN);
(void)signal(SIGQUIT, SIG_DFL);
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c
index 5e2100ea702..15ee9812b1b 100644
--- a/sbin/fsck_ffs/utilities.c
+++ b/sbin/fsck_ffs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.9 2001/01/15 19:52:37 deraadt Exp $ */
+/* $OpenBSD: utilities.c,v 1.10 2001/01/19 17:57:36 deraadt Exp $ */
/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: utilities.c,v 1.9 2001/01/15 19:52:37 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: utilities.c,v 1.10 2001/01/19 17:57:36 deraadt Exp $";
#endif
#endif /* not lint */
@@ -481,6 +481,7 @@ void
catch(n)
int n;
{
+ /* XXX signal race */
if (!doinglevel2)
ckfini(0);
exit(12);
@@ -497,6 +498,7 @@ catchquit(n)
{
extern int returntosingle;
+ /* XXX signal race */
printf("returning to single-user after filesystem check\n");
returntosingle = 1;
(void)signal(SIGQUIT, SIG_DFL);
@@ -511,6 +513,7 @@ voidquit(n)
int n;
{
+ /* XXX signal race */
sleep(1);
(void)signal(SIGQUIT, SIG_IGN);
(void)signal(SIGQUIT, SIG_DFL);
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 2a541adc3ef..f71da41dcdc 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.20 2000/08/20 18:42:39 millert Exp $ */
+/* $OpenBSD: init.c,v 1.21 2001/01/19 17:57:37 deraadt Exp $ */
/* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)init.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: init.c,v 1.20 2000/08/20 18:42:39 millert Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.21 2001/01/19 17:57:37 deraadt Exp $";
#endif
#endif /* not lint */
@@ -637,7 +637,7 @@ single_user()
SHREQUEST, sizeof(SHREQUEST) - 1);
while ((num = read(STDIN_FILENO, cp, 1)) != -1 &&
num != 0 && *cp != '\n' && cp < &altshell[127])
- cp++;
+ cp++;
*cp = '\0';
/* Copy in alternate shell */
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c
index af96e341bf3..9f460777094 100644
--- a/sbin/mount_portal/mount_portal.c
+++ b/sbin/mount_portal/mount_portal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_portal.c,v 1.13 1997/08/20 05:10:25 millert Exp $ */
+/* $OpenBSD: mount_portal.c,v 1.14 2001/01/19 17:57:39 deraadt Exp $ */
/* $NetBSD: mount_portal.c,v 1.8 1996/04/13 01:31:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
#else
-static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.13 1997/08/20 05:10:25 millert Exp $";
+static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.14 2001/01/19 17:57:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -93,7 +93,7 @@ sigchld(sig)
while ((pid = waitpid((pid_t) -1, NULL, WNOHANG)) > 0)
;
if (pid < 0 && errno != ECHILD)
- syslog(LOG_WARNING, "waitpid: %m");
+ syslog(LOG_WARNING, "waitpid: %m"); /* XXX signal race */
errno = save_errno;
}
@@ -109,7 +109,7 @@ static void
sigterm(sig)
int sig;
{
-
+ /* XXX signal races */
if (unmount(mountpt, MNT_FORCE) < 0)
syslog(LOG_WARNING, "sigterm: unmounting %s failed: %m",
mountpt);
diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c
index 75fdfd6ba3f..ef985dc782d 100644
--- a/sbin/nfsd/nfsd.c
+++ b/sbin/nfsd/nfsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsd.c,v 1.11 2000/01/22 20:25:03 deraadt Exp $ */
+/* $OpenBSD: nfsd.c,v 1.12 2001/01/19 17:57:40 deraadt Exp $ */
/* $NetBSD: nfsd.c,v 1.19 1996/02/18 23:18:56 mycroft Exp $ */
/*
@@ -616,7 +616,7 @@ void
nonfs(signo)
int signo;
{
-
+ /* XXX signal race */
syslog(LOG_ERR, "missing system call: NFS not available.");
}
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c
index c9199dafae2..f4e4b59994f 100644
--- a/sbin/restore/interactive.c
+++ b/sbin/restore/interactive.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interactive.c,v 1.10 2000/01/10 03:08:05 deraadt Exp $ */
+/* $OpenBSD: interactive.c,v 1.11 2001/01/19 17:57:41 deraadt Exp $ */
/* $NetBSD: interactive.c,v 1.10 1997/03/19 08:42:52 lukem Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)interactive.c 8.3 (Berkeley) 9/13/94";
#else
-static char rcsid[] = "$OpenBSD: interactive.c,v 1.10 2000/01/10 03:08:05 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: interactive.c,v 1.11 2001/01/19 17:57:41 deraadt Exp $";
#endif
#endif /* not lint */
@@ -795,8 +795,8 @@ onintr(signo)
int save_errno = errno;
if (command == 'i' && runshell)
- longjmp(reset, 1);
- if (reply("restore interrupted, continue") == FAIL)
- exit(1);
+ longjmp(reset, 1); /* XXX signal/longjmp reentrancy */
+ if (reply("restore interrupted, continue") == FAIL) /* XXX signal race */
+ _exit(1);
errno = save_errno;
}
diff --git a/sbin/routed/main.c b/sbin/routed/main.c
index b8f3dda15b8..36c186409fa 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.9 2001/01/16 03:06:08 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.10 2001/01/19 17:57:42 deraadt Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ char copyright[] =
#if !defined(lint)
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.9 2001/01/16 03:06:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.10 2001/01/19 17:57:42 deraadt Exp $";
#endif
#include "defs.h"
@@ -503,7 +503,7 @@ sigalrm(int sig)
* new and broken interfaces.
*/
ifinit_timer.tv_sec = now.tv_sec;
- trace_act("SIGALRM\n");
+ trace_act("SIGALRM\n"); /* XXX signal race */
}
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 74357ac023e..4e5697a5a47 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shutdown.c,v 1.19 2001/01/15 20:04:07 deraadt Exp $ */
+/* $OpenBSD: shutdown.c,v 1.20 2001/01/19 17:57:43 deraadt Exp $ */
/* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
#else
-static char rcsid[] = "$OpenBSD: shutdown.c,v 1.19 2001/01/15 20:04:07 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: shutdown.c,v 1.20 2001/01/19 17:57:43 deraadt Exp $";
#endif
#endif /* not lint */
@@ -351,7 +351,7 @@ void
timeout(signo)
int signo;
{
- longjmp(alarmbuf, 1);
+ longjmp(alarmbuf, 1); /* XXX signal/longjmp resource leaks */
}
void