P27: add missing proc.rs guard.caps derivation from euid
The capability bitmask patch was missing the critical proc.rs hunk that
derives caps from euid when procmgr writes ProcSchemeAttrs to a child
context. Without this, all child processes had caps=0, causing
EACCES on dup("create-scheme") and crashing boot.
Fix: in ContextHandle::Attr kwrite path, after setting euid/egid/pid/prio,
set guard.caps = CAP_ALL when euid==0, else 0.
This commit is contained in:
@@ -129,3 +129,12 @@ index 86aabc2..4af65a3 100644
|
||||
+++ b/src/startup/mod.rs
|
||||
@@ -190,0 +191 @@ pub(crate) fn kmain(bootstrap: Bootstrap) -> ! {
|
||||
+ context.caps = crate::scheme::caps::CAP_ALL;
|
||||
diff --git a/src/scheme/proc.rs b/src/scheme/proc.rs
|
||||
--- a/src/scheme/proc.rs
|
||||
+++ b/src/scheme/proc.rs
|
||||
@@ -1275,0 +1276,5 @@ impl ContextHandle {
|
||||
+ guard.caps = if info.euid == 0 {
|
||||
+ crate::scheme::caps::CAP_ALL
|
||||
+ } else {
|
||||
+ 0
|
||||
+ };
|
||||
|
||||
Reference in New Issue
Block a user