aboutsummaryrefslogtreecommitdiff
path: root/src/private/autojudging.php
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2014-08-15 10:48:22 +0000
committercassio <cassiopc@gmail.com>2014-08-15 10:48:22 +0000
commitbb2532444dfe59dba599b15c55c3c9f9ba378ed6 (patch)
treee308123d6297d16807235ddf8b2a4a6063fdc8c0 /src/private/autojudging.php
parent8056c11598c239da963e574d65d65342def472bd (diff)
downloadboca-bb2532444dfe59dba599b15c55c3c9f9ba378ed6.tar.gz
boca-bb2532444dfe59dba599b15c55c3c9f9ba378ed6.zip
copy run.exe if one exists to tmp where it will run
Diffstat (limited to 'src/private/autojudging.php')
-rwxr-xr-xsrc/private/autojudging.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/private/autojudging.php b/src/private/autojudging.php
index 984ef9a..13ee658 100755
--- a/src/private/autojudging.php
+++ b/src/private/autojudging.php
@@ -421,6 +421,11 @@ if($retval != 0) {
@chown($dir . $ds . 'tmp' . $ds . 'run.jar',"nobody");
@chmod($dir . $ds . 'tmp' . $ds . 'run.jar',0755);
}
+ if(is_readable($dir . $ds . 'run.exe')) {
+ @copy($dir . $ds . 'run.exe', $dir . $ds . 'tmp' . $ds . 'run.exe');
+ @chown($dir . $ds . 'tmp' . $ds . 'run.exe',"nobody");
+ @chmod($dir . $ds . 'tmp' . $ds . 'run.exe',0755);
+ }
chdir($dir . $ds . 'tmp');
echo "Executing " . $ex . " at " . getcwd() . " for input " . $file . "\n";
if(system($ex, $localretval)===false) $localretval=-1;