diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2015-01-18 15:13:11 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2015-01-18 15:13:11 +0000 |
commit | 677258f7e72fcafc9ff820ba1cae482182b0014b (patch) | |
tree | 406845e7428cb2139db4e8afc4299216a84a92a7 /sys/kern/kern_prot.c | |
parent | e3612a4c1f89a7f8cadc9640537efd9fd7865b3a (diff) | |
download | src-677258f7e72fcafc9ff820ba1cae482182b0014b.tar.gz src-677258f7e72fcafc9ff820ba1cae482182b0014b.zip |
Notes
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 2a667b598642..1043915658be 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1714,6 +1714,13 @@ p_candebug(struct thread *td, struct proc *p) if ((p->p_flag & P_INEXEC) != 0) return (EBUSY); + /* Denied explicitely */ + if ((p->p_flag2 & P2_NOTRACE) != 0) { + error = priv_check(td, PRIV_DEBUG_DENIED); + if (error != 0) + return (error); + } + return (0); } |