summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-04-21 19:39:03 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-04-21 19:39:03 +0000
commit51db4c344e4e2359ae72a16a0fcaee41bd15f95b (patch)
treeb296be7887819d3ea9b6e8da31d8cddbef3683d6 /etc/inc/config.inc
parentf2d532ecfaeb153ac0816318d35f2acf2c5961e7 (diff)
downloadpfsense-51db4c344e4e2359ae72a16a0fcaee41bd15f95b.zip
pfsense-51db4c344e4e2359ae72a16a0fcaee41bd15f95b.tar.gz
We really need to lock the configuration when outputting the config.cache
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index abedcf3..a4ff0e6 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -270,11 +270,13 @@ function parse_config($parse = false) {
******/
function generate_config_cache($config) {
global $g;
+ config_lock();
conf_mount_rw();
$configcache = fopen($g['tmp_path'] . '/config.cache', "w");
fwrite($configcache, serialize($config));
fclose($configcache);
conf_mount_ro();
+ config_unlock();
return true;
}
OpenPOWER on IntegriCloud