diff options
author | Sebastien Marie <semarie@cvs.openbsd.org> | 2015-07-27 15:02:37 +0000 |
---|---|---|
committer | Sebastien Marie <semarie@cvs.openbsd.org> | 2015-07-27 15:02:37 +0000 |
commit | 90b301d865b0eb5ddc66dd517809af9339464f40 (patch) | |
tree | fbb7ff7e8fe13cef99e8156c1f94cb92e2693028 /sys | |
parent | 1ee8008a4d53af0249a518dc7b801871b05a8c61 (diff) |
enforce tame by disabling all TAME_ flags if tame_fail() is reach, and not only
if TAME_ABORT is setted.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_tame.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c index 7b6c4488cd6..6d601a25d3f 100644 --- a/sys/kern/kern_tame.c +++ b/sys/kern/kern_tame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tame.c,v 1.14 2015/07/23 02:57:51 doug Exp $ */ +/* $OpenBSD: kern_tame.c,v 1.15 2015/07/27 15:02:36 semarie Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -251,13 +251,14 @@ tame_fail(struct proc *p, int error, int code) if (p->p_p->ps_tame & _TM_ABORT) { /* Core dump requested */ struct sigaction sa; - p->p_p->ps_tame = 0; /* Disable all TAME_ flags */ memset(&sa, 0, sizeof sa); sa.sa_handler = SIG_DFL; setsigvec(p, SIGABRT, &sa); psignal(p, SIGABRT); } else psignal(p, SIGKILL); + + p->p_p->ps_tame = 0; /* Disable all TAME_ flags */ return (error); } |