Make sure work directory is world-searchable
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon.pm
index f222500..1e5d8b2 100644 (file)
@@ -161,12 +161,13 @@ sub got_job{
 }
 
 sub run{
-       warn "No GRUNTMASTER_VM environment variable. Running without a VM is a security risk.\n"  unless $ENV{GRUNTMASTER_VM};
        require Gruntmaster::Data;
        $db = Gruntmaster::Data->connect($ENV{GRUNTMASTER_DSN} // 'dbi:Pg:');
        Log::Log4perl->init('/etc/gruntmasterd/gruntmasterd-log.conf');
        get_logger->info("gruntmasterd $VERSION started");
-       chdir tempdir 'gruntmasterd.XXXX', CLEANUP => 1, TMPDIR => 1;
+       my $dir = tempdir 'gruntmasterd.XXXX', CLEANUP => 1, TMPDIR => 1;
+       chmod 0711, $dir;
+       chdir $dir;
        while (1) {
                my $job = $db->jobs->search({daemon => undef}, {rows => 1})->first;
                got_job $job if defined $job;
This page took 0.024672 seconds and 4 git commands to generate.