For example, consider scripts to grade homework submissions
in a computer science course. Students submit
source code, and a script grade.sh is run on each submission
to compile it and run it against a test suite. The
submission server must execute grade.sh with sufficient
authority to accomplish its task, but should also
restrict its authority to protect the server from studentsubmitted
code and ensure the integrity of grading. At a
coarse grain, the server should allow grade.sh to access
files and directories necessary to compile, run, and
record the scores of homework submissions, and deny
access to other files or resources. This ensures, for example,
that a careless student’s code won’t corrupt the
server and a cheating student’s code won’t modify or leak
the test suite. At a fine grain, each call to grade.sh to
grade a single submission should be isolated from the
grading of other submissions. This ensures, for example,
that a cheating student cannot copy solutions from another
submission.