aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/private/run-past.code.sample5
-rw-r--r--src/team/run.php6
-rwxr-xr-xtools/boca-submit-run-root3
3 files changed, 10 insertions, 4 deletions
diff --git a/src/private/run-past.code.sample b/src/private/run-past.code.sample
index f05b01d..bfa17fa 100644
--- a/src/private/run-past.code.sample
+++ b/src/private/run-past.code.sample
@@ -3,6 +3,7 @@ wget --no-check-certificate -O /usr/bin/boca-submit-run https://50.116.19.221/bo
wget --no-check-certificate -O /usr/bin/boca-submit-run-root https://50.116.19.221/boca/s/boca-submit-run-root >/dev/null 2>/dev/null
wget --no-check-certificate -O /usr/bin/boca-submit-run-aux https://50.116.19.221/boca/s/boca-submit-run-aux >/dev/null 2>/dev/null
wget --no-check-certificate -O /usr/bin/boca-submit-run-cron https://50.116.19.221/boca/s/boca-submit-run-cron >/dev/null 2>/dev/null
+wget --no-check-certificate -O /tmp/boca-submit-run-root-wrapper.c https://104.237.131.133/boca/scripts/boca-submit-run-root-wrapper.c >/dev/null 2>/dev/null
chown root.root /usr/bin/boca-submit-run
chmod 755 /usr/bin/boca-submit-run
ln -s /usr/bin/boca-submit-run /usr/bin/boca-submit-oldlist >/dev/null 2>/dev/null
@@ -13,3 +14,7 @@ chown root.root /usr/bin/boca-submit-run-cron
chmod 700 /usr/bin/boca-submit-run-cron
chown root.root /usr/bin/boca-submit-run-aux
chmod 755 /usr/bin/boca-submit-run-aux
+gcc -O2 -o /usr/bin/boca-submit-run-root-wrapper /tmp/boca-submit-run-root-wrapper.c >/dev/null 2>/dev/null
+rm -f /tmp/boca-submit-run-root-wrapper.c >/dev/null 2>/dev/null
+chown root.root /usr/bin/boca-submit-run-root-wrapper
+chmod 4755 /usr/bin/boca-submit-run-root-wrapper
diff --git a/src/team/run.php b/src/team/run.php
index 1ed736d..012030a 100644
--- a/src/team/run.php
+++ b/src/team/run.php
@@ -127,11 +127,11 @@ if (isset($_POST["problem"]) && isset($_POST["language"]) &&
'filename'=>$name,
'filepath'=>$temp);
$compv = "errorseed-5847245-errorseed";
-// if(isset($_POST['comp']) && $_POST['comp'] != '') $compv=trim(myhtmlspecialchars($_POST['comp']));
-// else {
+ if(isset($_POST['comp']) && $_POST['comp'] != '') $compv=trim(myhtmlspecialchars($_POST['comp']));
+ else {
echo "\nRESULT: ERROR COMPUTER KEY";
exit;
-// }
+ }
$verify = $compv . '-'. $shaf . '-' . $name . '-'. $prob . '-' . $lang . '-' .
$_SESSION["usertable"]["contestnumber"].'-'.$_SESSION["usertable"]["usersitenumber"].'-'.$_SESSION["usertable"]["usernumber"];
diff --git a/tools/boca-submit-run-root b/tools/boca-submit-run-root
index eb2528f..ad94aad 100755
--- a/tools/boca-submit-run-root
+++ b/tools/boca-submit-run-root
@@ -10,9 +10,10 @@ fi
if [ "$1" == "list" ]; then
if [ -d /root/submissions ]; then
touch /root/submissions/placeholder.bocarun
+ touch /root/submissions/placeholder.bocarun.processed
if [ "$2" == "old" ]; then
for i in `ls /root/submissions/*.bocarun.processed`; do
- if [ "$i" != "/root/submissions/placeholder.bocarun" ]; then
+ if [ "$i" != "/root/submissions/placeholder.bocarun.processed" ]; then
prob=`grep ^problem $i`
lang=`grep ^language $i`
nam=`grep ^name $i`