Skip to content

Commit

Permalink
set umask as early as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaramc committed Sep 3, 2013
1 parent 62fb317 commit fa06a34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/gitolite-shell
Expand Up @@ -92,8 +92,6 @@ sub in_ssh {
sub main {
my $id = shift;

umask $rc{UMASK};

# set up the user
my $user = $ENV{GL_USER} = shift @ARGV;

Expand Down
4 changes: 3 additions & 1 deletion src/lib/Gitolite/Rc.pm
Expand Up @@ -90,9 +90,11 @@ unshift @{ $rc{ACCESS_1} }, 'Writable::access_1';
# use an env var that is highly unlikely to appear in real life :)
do $ENV{G3T_RC} if exists $ENV{G3T_RC} and -r $ENV{G3T_RC};

# setup some perl/rc/env vars
# setup some perl/rc/env vars, plus umask
# ----------------------------------------------------------------------

umask $rc{UMASK};

unshift @INC, "$rc{LOCAL_CODE}/lib" if $rc{LOCAL_CODE};

$ENV{PATH} = "$ENV{GL_BINDIR}:$ENV{PATH}" unless $ENV{PATH} =~ /^$ENV{GL_BINDIR}:/;
Expand Down

0 comments on commit fa06a34

Please sign in to comment.