Page MenuHomeFreeBSD

D57346.1794697717.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D57346.1794697717.diff

diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c
--- a/sys/kern/p1003_1b.c
+++ b/sys/kern/p1003_1b.c
@@ -40,6 +40,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/capsicum.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
@@ -130,6 +131,8 @@
targettd = td;
PROC_LOCK(targetp);
} else {
+ if (IN_CAPABILITY_MODE(td) && pid != td->td_proc->p_pid)
+ return (ECAPMODE);
targetp = pfind(pid);
if (targetp == NULL)
return (ESRCH);
@@ -177,6 +180,8 @@
targettd = td;
PROC_LOCK(targetp);
} else {
+ if (IN_CAPABILITY_MODE(td) && pid != td->td_proc->p_pid)
+ return (ECAPMODE);
targetp = pfind(pid);
if (targetp == NULL) {
return (ESRCH);
@@ -231,6 +236,8 @@
targettd = td;
PROC_LOCK(targetp);
} else {
+ if (IN_CAPABILITY_MODE(td) && pid != td->td_proc->p_pid)
+ return (ECAPMODE);
targetp = pfind(pid);
if (targetp == NULL)
return (ESRCH);
@@ -276,6 +283,8 @@
targettd = td;
PROC_LOCK(targetp);
} else {
+ if (IN_CAPABILITY_MODE(td) && uap->pid != td->td_proc->p_pid)
+ return (ECAPMODE);
targetp = pfind(uap->pid);
if (targetp == NULL)
return (ESRCH);
@@ -369,6 +378,8 @@
targetp = td->td_proc;
PROC_LOCK(targetp);
} else {
+ if (IN_CAPABILITY_MODE(td) && pid != td->td_proc->p_pid)
+ return (ECAPMODE);
targetp = pfind(pid);
if (targetp == NULL)
return (ESRCH);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 14, 11:08 PM (2 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41677478
Default Alt Text
D57346.1794697717.diff (1 KB)

Event Timeline