* 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";
umask 0022;
sub register {
my $fn = shift;
my $url = shift;

View File

@ -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";

View File

@ -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;