Fix EACCES check.

This commit is contained in:
4lDO2
2025-04-20 16:50:45 +02:00
parent bb570062e5
commit 74eb75f0e7
+3 -2
View File
@@ -1140,8 +1140,9 @@ impl<'a> ProcScheme<'a> {
return Err(Error::new(EPERM));
}
// After execv(), i.e. ProcCall::DisableSetpgid, setpgid shall return EACCESS
if proc.disabled_setpgid {
// After execv(), i.e. ProcCall::DisableSetpgid, setpgid where target_pid is a child
// process of the calling process, shall return EACCESS.
if proc.ppid == caller_pid && proc.disabled_setpgid {
return Err(Error::new(EACCES));
}