diff options
author | Ermal <eri@pfsense.org> | 2012-06-06 08:17:15 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-06-06 08:19:04 +0000 |
commit | 6bee76d5bb8fc9df41900ea77951012fb1cfd8ae (patch) | |
tree | 57f54ec9cdddad197a5e45529367b4b2ec9d0118 /etc/inc/util.inc | |
parent | fe838158d9889218915b015f1b0a40552b889ad2 (diff) | |
download | pfsense-6bee76d5bb8fc9df41900ea77951012fb1cfd8ae.zip pfsense-6bee76d5bb8fc9df41900ea77951012fb1cfd8ae.tar.gz |
Make lock files availble to all users for usage from php process
Diffstat (limited to 'etc/inc/util.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 d53b885..45d9f72 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(gettext("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)) |