diff options
author | Ermal <eri@pfsense.org> | 2012-06-06 08:17:44 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-06-06 08:17:44 +0000 |
commit | f26f4fa560fb8df9d2cdc26f5f61451ce466a951 (patch) | |
tree | ed7630caf5284d2e788b10dc8c4b74bae3b09e63 /etc/inc | |
parent | 1a69c4d133abf707703025bc8a5d2bf0d4f3f37b (diff) | |
download | pfsense-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.inc | 4 |
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)) |