Rabbit Contest
Notes for Administrators
Log in to rabbit as judge.
This file is html/administrator.html
Files in the judge account
Sub-Directories
- All directories have protection 700 except for html/
which is 755.
- exp/ is for experiments, there is nothing
important kept in here.
- files/ All submitted solutions are put in here,
file name is "t"+date+time+"p"+hexpid+extension.
Each submission is compiled in here; vital.h is also
kept here for those that #include "vital.h". During
judging, the executing program has the same name as
to source program, but with the extension ".exe", and
is deleted after judging.
- html/ all html and cgi and graphics needed
by them. This includes the problem statements. Also
contains receiver which is not a CGI program,
but the mail processor. The following four files have
protection "-rws--x--x":
- access1.cgi
- display1.cgi
- receiver
- register1.cgi
This is achieved with chmod 4711. Tis is required so
that these programs can access essential files while
being run by the webserver or mailserver without having
to leave those files unprotected.
- mail/ Standard mail directory.
- obj/ Special .o files that are linked with
all submissions: forbit.o, malloc.o, vital.o
- play/ Also for testing purposes.
- sols/ Reference solutions (source only)
to all problems. All protections kept at 600.
- src/ Source files for all the site's cgi
programs. Any executables here are unimportant; all
.cgis belong in html/
- tests All official test files (input and
output pairs) plus any problem generators. All
protections kept at 600.
- users/ User information files, and access.log
for protected (i.e. timed) problems.
Other Files
- .forward contains the line |/usr/home/users/judge/html/receiver
instructing the mail system to run the reciever program
for all incoming mail.
- record.txt Automatically generated record
of all sumbissions. May be edited when too long, only
by removing whole lines from the front.
- recordN.txt old versions of record.txt
saved before truncating.
- log.txt Detailed log of all submissions and
results of all tests. Can get long quickly, may be
shortened at any time.
How To Add New Problems
- Add the html problem statement to the html directory.
The name of the file should be "p"+number+".html"
(e.g. p101.html); any graphics files needed should
have names beginning with "p"+problemnumber+"p"
(e.g. p101p1.gif). There is a template for problem
statements in the file p.html. All these files
should have protection 644, except:
- Protected (timed) problems need a protection of
600 to prevent unrecorded access.
- Add a one-line entry to html/index.html, except:
- Protected program's entries should be added to
protected.html (or a similar file).
- Add test case and expected output files to the
tests directory. file names for inputs are
problemnumber+"in"+testnumber+".dat", file names for
outputs are problemnumbers+"out"+testnumber+".dat".
Test-numbers must start at 1 and not leave out any
numbers. There must be at least one test for each
problem. All these files are protected 600.
The Essential Programs (in src/)
- There is a makefile. Each of the following may
be reconstructed by "make (name)"; this automates the necessary
chmods too.
- These programs use the setuid bit. Never call the system function
or execute any shells, or run any program that is not in the
appropriate directory. Do not use execvp or execlp (i.e. do
not trust the path, give full filenames for executables).
- receiver (made from components receiver.cpp
sendemail.cpp comparer.cpp). Run by mailserver when a
submission is received. Responsible for compiling,
running, judging and responding.
- register1.cgi (made from components register1.cpp
sendemail.cpp) run by webserver when a new user
registers.
- access1.cgi Gives access to protected (timed)
problems, checks and records user's identity before
displaying text of problem.
- display1.cgi The status-of-recent-submissions program.