X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=box%2Fbox.c;h=1394a85d5f62d95b6d581d48d4ca14acd2a2a519;hb=e6f07a3c51c1117f3f95fa846dd042b5a4a1e201;hp=e3dadeaa70774f52ee6e49c7c69715891bfa2888;hpb=4fe7051e4ee89e51c6f6922220ab4b17d0d489b2;p=eval.git diff --git a/box/box.c b/box/box.c index e3dadea..1394a85 100644 --- a/box/box.c +++ b/box/box.c @@ -133,6 +133,7 @@ flush_line(void) partial_line = 0; } +/* Report an error of the sandbox itself */ static void NONRET __attribute__((format(printf,1,2))) die(char *msg, ...) { @@ -147,6 +148,7 @@ die(char *msg, ...) box_exit(2); } +/* Report an error of the program inside the sandbox */ static void NONRET __attribute__((format(printf,1,2))) err(char *msg, ...) { @@ -166,6 +168,7 @@ err(char *msg, ...) box_exit(1); } +/* Write a message, but only if in verbose mode */ static void __attribute__((format(printf,1,2))) msg(char *msg, ...) { @@ -259,12 +262,14 @@ static unsigned char syscall_action[NUM_ACTIONS] = { S(fcntl) = A_YES, S(fcntl64) = A_YES, S(mmap) = A_YES, + S(mmap2) = A_YES, S(munmap) = A_YES, S(ioctl) = A_YES, S(uname) = A_YES, S(gettid) = A_YES, S(set_thread_area) = A_YES, S(get_thread_area) = A_YES, + S(set_tid_address) = A_YES, S(exit_group) = A_YES, // Syscalls permitted only in liberal mode @@ -304,7 +309,6 @@ static unsigned char syscall_action[NUM_ACTIONS] = { S(rt_sigtimedwait) = A_YES | A_LIBERAL, S(rt_sigqueueinfo) = A_YES | A_LIBERAL, S(rt_sigsuspend) = A_YES | A_LIBERAL, - S(mmap2) = A_YES | A_LIBERAL, S(_sysctl) = A_YES | A_LIBERAL, #undef S };