]> mj.ucw.cz Git - eval.git/blobdiff - box/box.c
Oops, there was a typo in the previous patch.
[eval.git] / box / box.c
index e3dadeaa70774f52ee6e49c7c69715891bfa2888..1394a85d5f62d95b6d581d48d4ca14acd2a2a519 100644 (file)
--- 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
 };