aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@orbis-terrarum.net>2014-08-23 10:08:49 -0700
committerRobin H. Johnson <robbat2@orbis-terrarum.net>2014-08-23 10:08:49 -0700
commit71cc1f07c20c593abcbdb94d6fbc685fb4e929cf (patch)
treee96822602dbf3603310a3b9c8ea7d47296797c35
parentOnly change umask after wildrepos check. (diff)
downloadgitolite-gentoo-71cc1f07c20c593abcbdb94d6fbc685fb4e929cf.tar.gz
gitolite-gentoo-71cc1f07c20c593abcbdb94d6fbc685fb4e929cf.tar.bz2
gitolite-gentoo-71cc1f07c20c593abcbdb94d6fbc685fb4e929cf.zip
All calls to git-config need to be wrapped by the umask handler.
Signed-off-by: Robin H. Johnson <robbat2@orbis-terrarum.net>
-rw-r--r--src/gitolite.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gitolite.pm b/src/gitolite.pm
index bc18418..9162ac9 100644
--- a/src/gitolite.pm
+++ b/src/gitolite.pm
@@ -489,6 +489,10 @@ sub setup_git_configs
# git_configs_p is a ref to a hash whose elements look like
# {"reponame"}{sequence_number}{"key"} = "value";
+ my $oldumask = umask();
+ my $newumask = get_repo_umask($repo);
+ umask($newumask);
+
my %rch = %{ $git_configs_p->{$repo} };
# %rch has elements that look like {sequence_number}{"key"} = "value"
for my $seq (sort { $a <=> $b } keys %rch) {
@@ -505,6 +509,8 @@ sub setup_git_configs
}
}
}
+
+ umask($oldumask);
}
# ----------------------------------------------------------------------------