diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-04-10 17:29:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 17:29:02 +0200 |
commit | 0002ecc5bb7078e2da0350fcc3c2850cf02bcd7b (patch) | |
tree | 4a465207632b31ddae6d34df623ce37da5fd3267 /Bugzilla/Install | |
parent | 58c4f6814461ee4e35f0cffbdd63d948df940d35 (diff) | |
download | bugzilla-0002ecc5bb7078e2da0350fcc3c2850cf02bcd7b.tar.gz bugzilla-0002ecc5bb7078e2da0350fcc3c2850cf02bcd7b.tar.xz |
Bug 1450990 - Refactor a bunch of the logging config files
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r-- | Bugzilla/Install/Filesystem.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 70b195090..094226891 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -36,6 +36,7 @@ use Cwd (); use File::Slurp; use IO::File; use POSIX (); +use English qw(-no_match_vars $OSNAME); use base qw(Exporter); our @EXPORT = qw( @@ -106,6 +107,7 @@ use constant HTTPD_ENV => qw( LOCALCONFIG_ENV BUGZILLA_UNSAFE_AUTH_DELEGATION LOG4PERL_CONFIG_FILE + LOG4PERL_STDERR_DISABLE USE_NYTPROF NYTPROF_DIR ); @@ -162,6 +164,8 @@ sub DIR_CGI_OVERWRITE { _group() ? 0770 : 0777 }; # (or their subdirectories) to the user, via the webserver. sub DIR_ALSO_WS_SERVE { _suexec() ? 0001 : 0 }; +sub DIR_ALSO_WS_STICKY { $OSNAME eq 'linux' ? 02000 : 0 } + # This looks like a constant because it effectively is, but # it has to call other subroutines and read the current filesystem, # so it's defined as a sub. This is not exported, so it doesn't have @@ -186,6 +190,7 @@ sub FILESYSTEM { my $template_cache = bz_locations()->{'template_cache'}; my $graphsdir = bz_locations()->{'graphsdir'}; my $assetsdir = bz_locations()->{'assetsdir'}; + my $logsdir = bz_locations()->{'logsdir'}; # We want to set the permissions the same for all localconfig files # across all PROJECTs, so we do something special with $localconfig, @@ -277,6 +282,8 @@ sub FILESYSTEM { dirs => DIR_CGI_WRITE | DIR_ALSO_WS_SERVE }, "$datadir/db" => { files => CGI_WRITE, dirs => DIR_CGI_WRITE }, + $logsdir => { files => CGI_WRITE, + dirs => DIR_CGI_WRITE | DIR_ALSO_WS_STICKY }, $assetsdir => { files => WS_SERVE, dirs => DIR_CGI_OVERWRITE | DIR_ALSO_WS_SERVE }, @@ -361,6 +368,7 @@ sub FILESYSTEM { $webdotdir => DIR_CGI_WRITE | DIR_ALSO_WS_SERVE, $assetsdir => DIR_CGI_WRITE | DIR_ALSO_WS_SERVE, $template_cache => DIR_CGI_WRITE, + $logsdir => DIR_CGI_WRITE | DIR_ALSO_WS_STICKY, # Directories that contain content served directly by the web server. "$skinsdir/custom" => DIR_WS_SERVE, "$skinsdir/contrib" => DIR_WS_SERVE, |