From: Martin Mares Date: Thu, 3 Jul 2003 08:57:11 +0000 (+0000) Subject: Added a switch for allowing timing syscalls. X-Git-Tag: python-dummy-working~478 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b9ff9e0a4370eca27410e0295682d806576a42be;p=eval.git Added a switch for allowing timing syscalls. --- diff --git a/src/box.c b/src/box.c index 77b0a70..3dc4a19 100644 --- a/src/box.c +++ b/src/box.c @@ -35,6 +35,7 @@ static int use_wall_clock; static int file_access; static int verbose; static int memory_limit; +static int allow_times; static char *redir_stdin, *redir_stdout; static pid_t box_pid; @@ -207,6 +208,7 @@ valid_syscall(struct user *u) case SYS_munmap: case SYS_ioctl: case SYS_uname: + case 252: return 1; case SYS_time: case SYS_alarm: @@ -246,6 +248,8 @@ valid_syscall(struct user *u) case SYS_mmap2: case SYS__sysctl: return (filter_syscalls == 1); + case SYS_times: + return allow_times; default: return 0; } @@ -472,6 +476,7 @@ Options:\n\ -m \tLimit address space to KB\n\ -o \tRedirect stdout to \n\ -t