aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-30 00:37:44 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-30 00:37:44 +0200
commita14c663f8579cb097aa2d40a5a556703173b183b (patch)
tree478b6c507e6e255f46c0debe93f177b8f1c2f32a
parent8bbc2ef15138d2493cce5a39a4ba281e07a7c42a (diff)
downloadpfsense-packages-a14c663f8579cb097aa2d40a5a556703173b183b.tar.gz
pfsense-packages-a14c663f8579cb097aa2d40a5a556703173b183b.tar.bz2
pfsense-packages-a14c663f8579cb097aa2d40a5a556703173b183b.zip
Stop creating log_dir here to avoid stupid recursive chown on / bug
It's been already done squid_resync_general() in the first place, not needed at all. Leaving the squid_chown_recursive() safety checks in place, certainly good this to have here regardless.
-rwxr-xr-xconfig/squid3/34/squid.inc15
1 files changed, 1 insertions, 14 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index a7cb0490..d017852f 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -959,6 +959,7 @@ function squid_resync_general() {
$logdir = ($settings['log_dir'] ? $settings['log_dir'] : '/var/squid/logs');
if (!is_dir($logdir)) {
+ log_error("Creating Squid log dir $logdir");
safe_mkdir($logdir, 0755);
squid_chown_recursive($logdir, SQUID_UID, SQUID_GID);
}
@@ -1951,7 +1952,6 @@ function squid_resync($via_rpc = "no") {
chgrp(SQUID_LOCALBASE . "/libexec/squid/pinger", SQUID_GID);
}
- $log_dir = "";
$squid_enabled = false;
if (is_array($config['installedpackages']['squid']['config'])) {
// check if Squid is enabled
@@ -1964,19 +1964,6 @@ function squid_resync($via_rpc = "no") {
$squid_enabled = true;
}
}
- // create log dir if required
- if (is_array($config['installedpackages']['squid']['config'])) {
- if ($config['installedpackages']['squid']['config'][0]['log_dir'] != "") {
- $log_dir = $config['installedpackages']['squid']['config'][0]['log_dir'] . '/';
- }
- } else {
- $log_dir = "/var/squid/logs/";
- }
- if (!is_dir($log_dir)) {
- log_error("Creating Squid log dir $log_dir");
- safe_mkdir($log_dir, 0755);
- squid_chown_recursive($log_dir, SQUID_UID, SQUID_GID);
- }
// check cache dir and create if necessary
squid_dash_z();