- System Concepts
- Managing Programming Contests
- Mooshak interfaces
- Frequently asked questions
|
FAQ
- Setup and initial testing
- Contest configuration
- Evaluating submissions
- Email registration
Setup and initial testes FAQ
- How do I configure Mooshak with SELinux
Restrictions enforced by SELinux are registered in a log file, suc as /var/log/audit/audit.log .
Using the tools audit2why and audit2allow
you can analyze and create a module with a security policy that can be
added with the command line:
semodule –i
Here is a policy file for Mooshak
module mooshak 1.0;
require {
type home_root_t;
type httpd_sys_script_t;
class file { setattr read create ioctl write getattr unlink open append };
class dir { setattr read create write rmdir remove_name open add_name };
}
#============= httpd_sys_script_t ==============
allow httpd_sys_script_t home_root_t:dir { setattr read create write rmdir remove_name open add_name };
allow httpd_sys_script_t home_root_t:file { setattr read create
getattr write ioctl unlink open append };
(Answer contributed by David Carvalho - david@di.ubi.pt)
I get a server error after accessing Mooshak's initial page
This probably means that your Apache configuration does not support a
/cgi-bin/ directory for users. To allow programs to be executed in
this directory you should include these lines in the Apache
configuration file e restart the server.
<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>
When I use the save command in the admin's screen I get an error message
Mooshak's scripts and data files are installed in a certain OS
user's home - by default mooshak - and the CGI scripts should run
with the same user. The suexec module of Apache runs
CGI scripts in users directories as the corresponding and ensures that
scripts cannot be invoked by other users. Mooshak expects
suexec in order to run properly.
If you have this kind of error then you probably don't have
suexec installed. Some distributions install
suexec by default when you install Apache. Sometimes you
may need to recompile Apache with a certain configuration
Of course that you can just give all permissions to all data files by
executing chmod -R 777 data command in Mooshak's home
directory but I advise you against it. You will be compromising your
contest security.
I am using Fedora Core 3 and when Mooshak calls gcc to compile C/C++
programs it produces either Internal Error or SegFault, but the
programs compile on the shell
People using Mooshak reported that starting Apache in init.d, i.e.,
httpd start , intead of startssl solved this
problem. Apparently this script sets important environment variables
Configuration FAQ
I created several teams for a competition. How can I generate passwords for these teams and send them by email?
Use the command Passwords | Generate-to-archive in the groups folder of your contest. Then download the archive to you local disk, select the password sheets you need and send them by email.
I am not going check every submission and I want to mark them
automatically as final
I can do that by setting the Default_state to final in
the submissions folder of your contest.
Evaluating submissions FAQ
- I have a submission that Mooshak classifies as ... but when I
run it on the shell it works just fine
In Mooshak executions are similar to those you launch from the command
line, but you have to have in mind that Mooshak uses a safe execution
command to execute you program as an underprivileged user. To have
exactly the same type of execution you use the following command line
~mooshak/bin/safeexec --exec $COMMAND_LINE
In fact Mooshak invokes safexec with more command line
options to enforce limits over system resources (memory, time, etc),
but with this command line you may find, for instance, that your
program requires certain environment variables that are not available
to the safeexec user.
Also, if you copy data files for the test vectors using the clipboard
(CUT-PAST) that were produced in Windows then you should be aware that
Mooshak runs in Linux and this system uses a single end-of-file
character, instead of the sequence used by Windows.
Registration FAQ
- I want to prevent people from registering in a contest
After version 1.3 email registering is switched off by default. As
admin you can to set the Register field in the contest folder
to control email registation.
In versions before 1.3, you can disable registration by removing the
register command from the guest profile. To manage the
guest profile open the config/profiles/guest folder in
the admin interface, them select the register item in the
Authorized selector.
- Registration seams to be working but emails are not being sent
To be able to send email the server must have
sendmail
installed and configured. In the mail_log file in the
contests/your_contest/groups folder you should find
a pair of lines for each registration, the first written when Mooshak
started sending the message and the last when it terminated.
22.11.2004 18:31:38: sending to zp@ncc.up.pt
22.11.2004 18:31:38: OK sent to zp@ncc.up.pt.
If an error occurs during this phase then the second line will have
the error message generated by the sendmail .
|