  		$compare_runpath = fetch_executable($workdirpath, $row['compare'], $row['compare_md5sum']);
  		$run_runpath = fetch_executable($workdirpath, $row['run'], $row['run_md5sum']);
 diff --git a/judge/runguard.c b/judge/runguard.c
-index 2d613ab..527a2f1 100644
+index 4592da7..364a659 100644
 --- a/judge/runguard.c
 +++ b/judge/runguard.c
-@@ -621,15 +621,18 @@ void read_optarg_time(const char *desc, double *times)
+@@ -169,6 +169,7 @@ struct timeval starttime, endtime;
+ struct tms startticks, endticks;
+ 
+ struct option const long_opts[] = {
++	{"audoscore_path",       required_argument, NULL,         'A'},
+ 	{"root",       required_argument, NULL,         'r'},
+ 	{"user",       required_argument, NULL,         'u'},
+ 	{"group",      required_argument, NULL,         'g'},
+@@ -623,15 +624,18 @@ void read_optarg_time(const char *desc, double *times)
  void setrestrictions()
  {
  	char *path;

From 34638dc565a44f225de7009105f23d20929b1a8f Mon Sep 17 00:00:00 2001
From: Robert Obermeier <obbi@u5b.de>
Date: Sun, 3 Aug 2014 21:03:59 +0000
Subject: [PATCH] AuDoScore changeset

---
 judge/judgedaemon.main.php |   20 +++++++++++---------
 judge/runguard.c           |    3 +++
 lib/www/auth.php           |    2 +-
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/judge/judgedaemon.main.php b/judge/judgedaemon.main.php
index 566faa0..9236cae 100644
--- a/judge/judgedaemon.main.php
+++ b/judge/judgedaemon.main.php
@@ -55,6 +55,7 @@ function request($url, $verb = 'GET', $data = '', $failonerror = true) {

 
 	/* Set resource limits: must be root to raise hard limits.
 	   Note that limits can thus be raised from the systems defaults! */
@@ -794,10 +798,13 @@ int main(int argc, char **argv)
 	be_verbose = be_quiet = 0;
 	show_help = show_version = 0;
 	opterr = 0;
-	while ( (opt = getopt_long(argc,argv,"+r:u:g:t:C:m:f:p:P:co:e:s:M:vq",long_opts,(int *) 0))!=-1 ) {
+	while ( (opt = getopt_long(argc,argv,"+r:u:g:t:C:m:f:p:P:co:e:s:M:A:vq",long_opts,(int *) 0))!=-1 ) {
 		switch ( opt ) {
 		case 0:   /* long-only option */
 			break;
+		case 'A': /* AuDoscore path option */
+			setenv("AUDOSCORE_PATH", optarg, 1);
+			break;
 		case 'r': /* rootdir option */
 			use_root = 1;
 			rootdir = (char *) malloc(strlen(optarg)+2);
-- 
1.7.9.5

