I'm looking for the concept to spawn a process such that:
- it has only access to certain libraries/APIs
- it cannot acess the file system or only specific parts
- it can do least harm should malicious code run in it
This concept is known as sandbox or jail.
It is required to do this for each major Operating system (Windows, MacOSX and Linux) and the question is conceptual (as in what to do, which APIs to use and and what to observe) rather then language specific.
answer requirements
I really want to accept an answer and give you 20 points for that. I cannot accept my own answer, and I don't have it yet anyway. So if you really want your answer to be accepted, please observe:
- The answer has to be specific and complete
- With specific I mean that it is more then a pointer to some resource on the internet. It has to summarize what the resource says about the topic at least.
- It may or may not contain example code, but if it does please write it in C
- I cannot accept an answer that is 2/3 complete even if the 2/3 that are there are perfect.
this question FAQ
- Is this homework? No.
- Why do you ask this like a homework question? If you ask a specific question and you want to get a specific answer, and you know how that answer should look like, even though you don't know the answer, that's the style of question you get.
- If you know how it should look like, why do you ask? 1) because I don't know all the answer 2) because on the internet there's no single place that contains all the details to this question in one place. Please also read the stackoverflow FAQ
- Why is the main part of your question how to answer this question? Because nobody reads the FAQ.