mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make lock files availble to all users for usage from php process
This commit is contained in:
parent
fe838158d9
commit
6bee76d5bb
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user