From: Heiko Schlittermann (HS12-RIPE) Date: Sun, 6 Nov 2016 23:04:32 +0000 (+0100) Subject: Set umask only if not 022 already, print a notice about doing thata X-Git-Url: https://git.exim.org/buildfarm-client.git/commitdiff_plain/8ed615f58dcd140b08e4dcaa466b88c4e30d784d Set umask only if not 022 already, print a notice about doing thata --- diff --git a/run_build b/run_build index ef80039..b1c063f 100755 --- a/run_build +++ b/run_build @@ -36,6 +36,7 @@ our $VERSION = 'REL_0.1'; use strict; use warnings; +use 5.010; use Config; use Fcntl qw(:flock :seek); use File::Path; @@ -83,15 +84,15 @@ if ($0 =~ /(.*)\.pl$/) { exec $1, @ARGV; } -die "$0: please use an umask of 022\n" - if umask > 022; +if (umask != 022) { + umask 022; + say "$0: forced umask to 022" if -t; +} my %module_hooks; my $orig_dir = getcwd(); push @INC, $orig_dir; -umask 022; - # make sure we exit nicely on any normal interrupt # so the cleanup handler gets called. # that lets us stop the db if it's running and