judge-server
judge-server copied to clipboard
cptbox multiprocess support
cptbox, after #188, should logically implement multiprocess debugging support. This may one day permit the implementation of a BASH language, if we manage to limit what it can exec.
Now, everywhere we use kill, i.e. shocker, protection faults, we have to kill by pgid, which for cptbox-based process trees is -pid of the first child. (Even though monitor does attempt to kill all children that it is aware of, it's still unwise to rely on the fact.)
Debian/kFreeBSD jessie does not have PT_FOLLOW_FORK defined. However, passing 23 works.
Isn't this complete?
No, this is not implemented in a safe manner yet, or we'd have shell executors on DMOJ :)
Will landlock allow this to be cleaned up?
Yes, that's one of the biggest missing pieces.
Would we need to only allow bash when paired with landlock? I guess so... is the other option to stop all processes when a file access happens?
Yes, and ensure that they actually all get stopped, which sounds painful. We'd probably want to have some non-bash-builtins too, but this is super low-priority so hasn't been given much thought.