Use sudo in VM
[gruntmaster-daemon.git] / gruntmaster-exec
index 9590b4e34173feaa8198bfa13e84e424d810bea6..8ab857b2c469504182859214d6d2ab402489b5fc 100755 (executable)
@@ -18,9 +18,6 @@ use constant +{
        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/;
@@ -59,7 +56,7 @@ if ($ret) {
                }
                $tle = 1
        };
-       alarm ($timeout || 5);
+       alarm ($timeout || 10);
        waitpid $ret, 0;
        alarm 0;
        if (@sudo) {
@@ -93,8 +90,6 @@ if ($ret) {
        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;
This page took 0.009655 seconds and 4 git commands to generate.