Skip to content

Commit c8d6425

Browse files
Merge pull request #29 from coding-blocks/runguard
Runguard
2 parents 1410f06 + c8ec9fd commit c8d6425

File tree

5 files changed

+1084
-2
lines changed

5 files changed

+1084
-2
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
FROM node:8-alpine
22

33
RUN apk add --no-cache docker
4+
RUN apk add build-base
45

5-
WORKDIR /usr/src/judge-taskmaster
6+
WORKDIR /usr/src/judge-taskmaster/
7+
COPY runguard runguard
8+
9+
WORKDIR /usr/src/judge-taskmaster/runguard
10+
RUN gcc runguard.c -o /usr/bin/runguard
611

12+
WORKDIR /usr/src/judge-taskmaster
713

814
COPY package.json .
915
COPY package-lock.json .
@@ -12,5 +18,6 @@ RUN npm install -D
1218

1319
COPY . .
1420

21+
WORKDIR /usr/src/judge-taskmaster
1522

1623
CMD ["npm", "start"]

runguard/runguard-config.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* Runguard config for use with CodeRunner. Includes all necessary
2+
* DOMJudge constants from config.h.
3+
* Assumes all tests will be done as the Linux user "coderunner".
4+
* It is assumed CHROOT will not be used so the CHROOT_PREFIX
5+
* is not meaningfully set.
6+
*/
7+
8+
#ifndef _RUNGUARD_CONFIG_
9+
#define _RUNGUARD_CONFIG_
10+
11+
#define DOMJUDGE_VERSION "3"
12+
#define REVISION "3.3"
13+
14+
#define VALID_USERS "codingblocks,domjudge,jobe,jobe00,jobe01,jobe02,jobe03,jobe04,jobe05,jobe06,jobe07,jobe08,jobe09,jobe10,jobe11,jobe12,jobe13,jobe14,jobe15,jobe16,jobe17,jobe18,jobe19"
15+
16+
#define CHROOT_PREFIX "/var/www/jobe/chrootjail"
17+
18+
#endif /* _RUNGUARD_CONFIG_ */

0 commit comments

Comments
 (0)