Page MenuHomeFreeBSD

D57385.1794450861.diff
No OneTemporary

Authored By
Unknown
Size
766 B
Referenced Files
None
Subscribers
None

D57385.1794450861.diff

Index: sys/kern/kern_prot.c
===================================================================
--- sys/kern/kern_prot.c
+++ sys/kern/kern_prot.c
@@ -49,6 +49,7 @@
#include <sys/systm.h>
#include <sys/abi_compat.h>
#include <sys/acct.h>
+#include <sys/capsicum.h>
#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/libkern.h>
@@ -190,6 +191,8 @@
p = td->td_proc;
PROC_LOCK(p);
} else {
+ if (IN_CAPABILITY_MODE(td) && uap->pid != td->td_proc->p_pid)
+ return (ECAPMODE);
p = pfind(uap->pid);
if (p == NULL)
return (ESRCH);
@@ -229,6 +232,8 @@
p = td->td_proc;
PROC_LOCK(p);
} else {
+ if (IN_CAPABILITY_MODE(td) && pid != td->td_proc->p_pid)
+ return (ECAPMODE);
p = pfind(pid);
if (p == NULL)
return (ESRCH);

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 2:34 AM (8 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41654213
Default Alt Text
D57385.1794450861.diff (766 B)

Event Timeline