I would like to be able to spawn a linux process that would only have access to stdin, stdout, and stderr (nothing more and nothing less). Can I do this at the process level itself? I am also implicitly stating (oxymoron) that I don't want the spawned process to be able to change the "thing" that the other end of the stream points to.
Metaphorically:
- the process has a input pipe that comes from somewhere, it cannot change where the pipe starts from, so it cannot control where input comes from.
- the process has output and error pipes that go somewhere, it cannot change where the other end of the output pipes point to, so it cannot control where output goes to.
- it cannot create any new pipes.
I am also currently looking at SElinux. Would this allow me to create a process that only had access to these three streams? Thank you.