Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Do not restrict the siginfo a process sends to itse...
details: https://anonhg.NetBSD.org/src/rev/23075f3fe797
branches: trunk
changeset: 762862:23075f3fe797
user: martin <martin%NetBSD.org@localhost>
date: Thu Mar 03 20:46:16 2011 +0000
description:
Do not restrict the siginfo a process sends to itself in any way, but
keep restrictions for foreign processes. This is needed to allow raising
of full SIGFPE siginfo from softfloat libraries for example.
diffstat:
sys/kern/sys_sig.c | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diffs (52 lines):
diff -r a8d09fdcb3ed -r 23075f3fe797 sys/kern/sys_sig.c
--- a/sys/kern/sys_sig.c Thu Mar 03 19:24:43 2011 +0000
+++ b/sys/kern/sys_sig.c Thu Mar 03 20:46:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_sig.c,v 1.31 2011/02/03 21:45:32 joerg Exp $ */
+/* $NetBSD: sys_sig.c,v 1.32 2011/03/03 20:46:16 martin Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.31 2011/02/03 21:45:32 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.32 2011/03/03 20:46:16 martin Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -223,20 +223,22 @@
if ((u_int)ksi->ksi_signo >= NSIG)
return EINVAL;
- if (ksi->ksi_pid != l->l_proc->p_pid)
- return EPERM;
+ if (pid != l->l_proc->p_pid) {
+ if (ksi->ksi_pid != l->l_proc->p_pid)
+ return EPERM;
- if (ksi->ksi_uid != kauth_cred_geteuid(l->l_cred))
- return EPERM;
+ if (ksi->ksi_uid != kauth_cred_geteuid(l->l_cred))
+ return EPERM;
- switch (ksi->ksi_code) {
- case SI_USER:
- case SI_QUEUE:
- break;
- default:
- return EPERM;
+ switch (ksi->ksi_code) {
+ case SI_USER:
+ case SI_QUEUE:
+ break;
+ default:
+ return EPERM;
+ }
}
-
+
if (pid > 0) {
/* kill single process */
mutex_enter(proc_lock);
- Prev by Date:
[src/trunk]: src/share/misc This will never end... ABR, ACP, ACS, ACU, ADP, A...
- Next by Date:
[src/trunk]: src/sys/dev/acpi Add DMI quirk support via pmf_get_platform(9). ...
- Previous by Thread:
[src/trunk]: src/share/misc This will never end... ABR, ACP, ACS, ACU, ADP, A...
- Next by Thread:
[src/trunk]: src/sys/dev/acpi Add DMI quirk support via pmf_get_platform(9). ...
- Indexes:
Home |
Main Index |
Thread Index |
Old Index