summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-06-06 08:17:44 +0000
committerErmal <eri@pfsense.org>2012-06-06 08:17:44 +0000
commitf26f4fa560fb8df9d2cdc26f5f61451ce466a951 (patch)
treeed7630caf5284d2e788b10dc8c4b74bae3b09e63 /etc/inc
parent1a69c4d133abf707703025bc8a5d2bf0d4f3f37b (diff)
downloadpfsense-f26f4fa560fb8df9d2cdc26f5f61451ce466a951.zip
pfsense-f26f4fa560fb8df9d2cdc26f5f61451ce466a951.tar.gz
Make lock files availble to all users for usage from php process
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/util.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index b7517db..8284e9f 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -117,8 +117,10 @@ function lock($lock, $op = LOCK_SH) {
global $g, $cfglckkeyconsumers;
if (!$lock)
die("WARNING: You must give a name as parameter to lock() function.");
- if (!file_exists("{$g['tmp_path']}/{$lock}.lock"))
+ if (!file_exists("{$g['tmp_path']}/{$lock}.lock")) {
@touch("{$g['tmp_path']}/{$lock}.lock");
+ @chmod("{$g['tmp_path']}/{$lock}.lock", 0666);
+ }
$cfglckkeyconsumers++;
if ($fp = fopen("{$g['tmp_path']}/{$lock}.lock", "w")) {
if (flock($fp, $op))
OpenPOWER on IntegriCloud