diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-12-09 16:29:57 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-12-09 16:29:57 +0000 |
commit | 66dd2fd56d125e745be9fa10b429f469cae7b665 (patch) | |
tree | f5bd984dcaaa0e343905870ff938128826621638 /sys/compat | |
parent | b177d8a42ad6b567b776cbf88bf05832984b6724 (diff) |
Add entries in compat signal mapping arrays for SIGTHR.
Prompted by parfait noticing overflows in ibcs2/svr4 which
are now changed to being NSIG sized like the others as
suggested by tedu.
ok tedu@ miod@ guenther@
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/hpux/hpux_sig.c | 8 | ||||
-rw-r--r-- | sys/compat/ibcs2/ibcs2_signal.c | 5 | ||||
-rw-r--r-- | sys/compat/linux/linux_signal.c | 3 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_signal.c | 5 |
4 files changed, 13 insertions, 8 deletions
diff --git a/sys/compat/hpux/hpux_sig.c b/sys/compat/hpux/hpux_sig.c index f644e483319..a655f95b645 100644 --- a/sys/compat/hpux/hpux_sig.c +++ b/sys/compat/hpux/hpux_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpux_sig.c,v 1.11 2008/05/01 11:53:26 miod Exp $ */ +/* $OpenBSD: hpux_sig.c,v 1.12 2009/12/09 16:29:56 jsg Exp $ */ /* $NetBSD: hpux_sig.c,v 1.16 1997/04/01 19:59:02 scottr Exp $ */ /* @@ -60,7 +60,8 @@ char hpuxtobsdsigmap[NSIG] = { /*01*/ SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGIOT, SIGEMT, SIGFPE, /*09*/ SIGKILL, SIGBUS, SIGSEGV, SIGSYS, SIGPIPE, SIGALRM, SIGTERM, SIGUSR1, /*17*/ SIGUSR2, SIGCHLD, 0, SIGVTALRM,SIGPROF, SIGIO, SIGWINCH, SIGSTOP, -/*25*/ SIGTSTP, SIGCONT,SIGTTIN, SIGTTOU, SIGURG, 0, 0, 0 +/*25*/ SIGTSTP, SIGCONT,SIGTTIN, SIGTTOU, SIGURG, 0, 0, 0, +/*33*/ 0 }; /* indexed by BSD signal number - 1 */ @@ -68,7 +69,8 @@ char bsdtohpuxsigmap[NSIG] = { /*01*/ 1, 2, 3, 4, 5, 6, 7, 8, /*09*/ 9, 10, 11, 12, 13, 14, 15, 29, /*17*/ 24, 25, 26, 18, 27, 28, 22, 0, -/*25*/ 0, 20, 21, 23, 0, 16, 17, 0 +/*25*/ 0, 20, 21, 23, 0, 16, 17, 0, +/*33*/ 0 }; /* diff --git a/sys/compat/ibcs2/ibcs2_signal.c b/sys/compat/ibcs2/ibcs2_signal.c index 315f74e82bc..bbd03a82423 100644 --- a/sys/compat/ibcs2/ibcs2_signal.c +++ b/sys/compat/ibcs2/ibcs2_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ibcs2_signal.c,v 1.9 2009/06/01 20:11:38 weingart Exp $ */ +/* $OpenBSD: ibcs2_signal.c,v 1.10 2009/12/09 16:29:56 jsg Exp $ */ /* $NetBSD: ibcs2_signal.c,v 1.8 1996/05/03 17:05:27 christos Exp $ */ /* @@ -56,7 +56,7 @@ #define ibcs2_sigismember(s, n) (*(s) & ibcs2_sigmask(n)) #define ibcs2_sigaddset(s, n) (*(s) |= ibcs2_sigmask(n)) -int bsd_to_ibcs2_sig[] = { +int bsd_to_ibcs2_sig[NSIG] = { 0, /* 0 */ IBCS2_SIGHUP, /* 1 */ IBCS2_SIGINT, /* 2 */ @@ -89,6 +89,7 @@ int bsd_to_ibcs2_sig[] = { 0, /* 29 */ IBCS2_SIGUSR1, /* 30 */ IBCS2_SIGUSR2, /* 31 */ + 0, /* 32 - SIGTHR */ }; int ibcs2_to_bsd_sig[] = { diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 145ae4ca70f..a3de140578c 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_signal.c,v 1.13 2008/05/01 11:53:26 miod Exp $ */ +/* $OpenBSD: linux_signal.c,v 1.14 2009/12/09 16:29:56 jsg Exp $ */ /* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */ /* @@ -98,6 +98,7 @@ int bsd_to_linux_sig[NSIG] = { 0, /* SIGINFO */ LINUX_SIGUSR1, LINUX_SIGUSR2, + 0, /* SIGTHR */ }; int linux_to_bsd_sig[LINUX__NSIG] = { diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index 6131f97260a..a2f26b16edd 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_signal.c,v 1.11 2008/05/01 11:53:26 miod Exp $ */ +/* $OpenBSD: svr4_signal.c,v 1.12 2009/12/09 16:29:56 jsg Exp $ */ /* $NetBSD: svr4_signal.c,v 1.24 1996/12/06 03:21:53 christos Exp $ */ /* @@ -75,7 +75,7 @@ svr4_sigfillset(s) svr4_sigaddset(s, i); } -int bsd_to_svr4_sig[] = { +int bsd_to_svr4_sig[NSIG] = { 0, SVR4_SIGHUP, SVR4_SIGINT, @@ -108,6 +108,7 @@ int bsd_to_svr4_sig[] = { 0, SVR4_SIGUSR1, SVR4_SIGUSR2, + 0 }; int svr4_to_bsd_sig[] = { |