* Set umask to 0022 on startup.

This commit is contained in:
Eelco Dolstra 2003-05-30 20:53:36 +00:00
parent 5908663f42
commit f66055fa1e
3 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,8 @@ my $tmpfile = "$prefix/var/nix/prebuilts.tmp";
my $conffile = "$etcdir/prebuilts.conf"; my $conffile = "$etcdir/prebuilts.conf";
umask 0022;
sub register { sub register {
my $fn = shift; my $fn = shift;
my $url = shift; my $url = shift;

View file

@ -5,6 +5,8 @@ my $etcdir = "$prefix/etc/nix";
my $exportdir = "$prefix/var/nix/prebuilts/exports"; my $exportdir = "$prefix/var/nix/prebuilts/exports";
my $knowns = "$prefix/var/nix/known-prebuilts"; my $knowns = "$prefix/var/nix/known-prebuilts";
umask 0022;
# For performance, put the known hashes in an associative array. # For performance, put the known hashes in an associative array.
my %knowns = (); my %knowns = ();
open KNOWNS, "<$knowns"; open KNOWNS, "<$knowns";

View file

@ -301,6 +301,8 @@ void printUsage()
/* Parse the command-line arguments, call the right operation. */ /* Parse the command-line arguments, call the right operation. */
void run(Strings::iterator argCur, Strings::iterator argEnd) void run(Strings::iterator argCur, Strings::iterator argEnd)
{ {
umask(0022);
Strings extraArgs; Strings extraArgs;
enum { cmdUnknown, cmdInstantiate } command = cmdUnknown; enum { cmdUnknown, cmdInstantiate } command = cmdUnknown;