9pnet
9pnet_virtio
EOF
+cat >> vm/etc/sudoers <<EOF
+Defaults>nobody closefrom=5
+Defaults>nobody !env_check
+Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME"
+EOF
install gruntmaster-exec gruntmaster-compile vm/usr/bin/
-sed -i -e "s/USER => 65534/USER => $USER/" -e "s/GROUP => 65534/GROUP => $GROUP/" vm/usr/bin/gruntmaster-exec
chroot vm update-initramfs -d -k 3.2.0-4-amd64
chroot vm update-initramfs -c -k 3.2.0-4-amd64
umount vm/proc
aptsources=Debian
[Debian]
-packages=linux-image-3.2.0-4-amd64 mawk libbsd-resource-perl libipc-signal-perl gcc g++ mono-gmcs default-jdk golang-go gccgo ghc fpc perl python
+packages=linux-image-3.2.0-4-amd64 mawk libbsd-resource-perl libipc-signal-perl gcc g++ mono-gmcs default-jdk golang-go gccgo ghc fpc perl python sudo
source=http://ftp.ro.debian.org/debian
keyring=debian-archive-keyring
suite=wheezy
DIED => 5,
REJ => 10,
};
-# These constants are changed by ex/makevm
-use constant USER => 65534;
-use constant GROUP => 65534;
use BSD::Resource qw/setrlimit RLIMIT_AS RLIMIT_FSIZE RLIMIT_NPROC/;
use IPC::Signal qw/sig_name sig_num/;
setrlimit RLIMIT_AS, $mlimit, $mlimit or die $! if $mlimit;
setrlimit RLIMIT_FSIZE, $olimit, $olimit or die $! if $olimit;
setrlimit RLIMIT_NPROC, $nproc, $nproc or die $! if $nobody;
- POSIX::setgid $nobody ? 65534 : USER;
- POSIX::setuid $nobody ? 65534 : GROUP;
unshift @ARGV, @sudo;
say STDERR "Executing: ", join ' ', map { "'$_'" } @ARGV if $debug;
exec @ARGV;