From f66055fa1ef3eb208666b5ace7b5ab16bf7e8980 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 30 May 2003 20:53:36 +0000 Subject: [PATCH] * Set umask to 0022 on startup. --- scripts/nix-pull-prebuilts | 2 ++ scripts/nix-push-prebuilts | 2 ++ src/fix.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/scripts/nix-pull-prebuilts b/scripts/nix-pull-prebuilts index 9cc668337..3d045b463 100755 --- a/scripts/nix-pull-prebuilts +++ b/scripts/nix-pull-prebuilts @@ -7,6 +7,8 @@ my $tmpfile = "$prefix/var/nix/prebuilts.tmp"; my $conffile = "$etcdir/prebuilts.conf"; +umask 0022; + sub register { my $fn = shift; my $url = shift; diff --git a/scripts/nix-push-prebuilts b/scripts/nix-push-prebuilts index c0e3b45c5..2d44e7cda 100755 --- a/scripts/nix-push-prebuilts +++ b/scripts/nix-push-prebuilts @@ -5,6 +5,8 @@ my $etcdir = "$prefix/etc/nix"; my $exportdir = "$prefix/var/nix/prebuilts/exports"; my $knowns = "$prefix/var/nix/known-prebuilts"; +umask 0022; + # For performance, put the known hashes in an associative array. my %knowns = (); open KNOWNS, "<$knowns"; diff --git a/src/fix.cc b/src/fix.cc index b26f8eb59..30303322a 100644 --- a/src/fix.cc +++ b/src/fix.cc @@ -301,6 +301,8 @@ void printUsage() /* Parse the command-line arguments, call the right operation. */ void run(Strings::iterator argCur, Strings::iterator argEnd) { + umask(0022); + Strings extraArgs; enum { cmdUnknown, cmdInstantiate } command = cmdUnknown;