From 8ed615f58dcd140b08e4dcaa466b88c4e30d784d Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Mon, 7 Nov 2016 00:04:32 +0100 Subject: [PATCH 1/1] Set umask only if not 022 already, print a notice about doing thata --- run_build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.30.2