From 512fc4a0a547a3c29d1502e8caddd692ac880890 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 15 Dec 2009 16:11:21 +0530 Subject: [PATCH] auth: set umask when autoviv-ing repos Looks like I'd forgotten this when I did the autoviv code. Repos created via gl-compile (when you add a new repo to the config file and push) worked fine, but repos created via gl-auth (when you autoviv a repo, wild or not) did not. This *should* be merged into wildrepos soon after testing; wildrepos will have a lot more autoviv-ing than master. --- src/gl-auth-command | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gl-auth-command b/src/gl-auth-command index 12b3234..463439e 100755 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@ -23,9 +23,8 @@ use warnings; # common definitions # ---------------------------------------------------------------------------- - # these are set by the "rc" file -our ($GL_LOGT, $GL_CONF_COMPILED, $REPO_BASE, $GIT_PATH, $GL_ADMINDIR); +our ($GL_LOGT, $GL_CONF_COMPILED, $REPO_BASE, $GIT_PATH, $REPO_UMASK, $GL_ADMINDIR); # and these are set by gitolite.pm our ($R_COMMANDS, $W_COMMANDS, $REPONAME_PATT); our %repos; @@ -47,6 +46,9 @@ $ENV{GL_BINDIR} = $bindir; # add a custom path for git binaries, if specified $ENV{PATH} .= ":$GIT_PATH" if $GIT_PATH; +# set the umask before creating any files +umask($REPO_UMASK); + # ---------------------------------------------------------------------------- # start... # ----------------------------------------------------------------------------