Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171726054
D44372.id135782.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
854 B
Referenced Files
None
Subscribers
None
D44372.id135782.diff
View Options
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1330,6 +1330,16 @@
return (0);
}
+ /*
+ * When running in capsicum(4) mode, make wait(2) ignore
+ * processes created with pdfork(2). This is because one can
+ * disown them - by passing their process descriptor to another
+ * process - which means it needs to be prevented from touching
+ * them afterwards.
+ */
+ if (IN_CAPABILITY_MODE(td) && p->p_procdesc != NULL)
+ continue;
+
nfound++;
PROC_LOCK_ASSERT(p, MA_OWNED);
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -157,7 +157,7 @@
int fd
);
}
-7 AUE_WAIT4 STD {
+7 AUE_WAIT4 STD|CAPENABLED {
int wait4(
int pid,
_Out_opt_ int *status,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 1:37 AM (5 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38880959
Default Alt Text
D44372.id135782.diff (854 B)
Attached To
Mode
D44372: Allow subset of wait4(2) functionality in Capsicum mode
Attached
Detach File
Event Timeline
Log In to Comment