diff options
author | jim-p <jimp@pfsense.org> | 2013-01-15 11:28:56 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-01-15 11:28:56 -0500 |
commit | a74260cb3f4811212d6fb4d5ebc0b231bdfa52a6 (patch) | |
tree | 351943a24ca76510f27a35659ddc31fb26c3c4f2 /etc/inc/config.lib.inc | |
parent | b3435de108a2291950e147cd321e3e1f4733ff02 (diff) | |
download | pfsense-a74260cb3f4811212d6fb4d5ebc0b231bdfa52a6.zip pfsense-a74260cb3f4811212d6fb4d5ebc0b231bdfa52a6.tar.gz |
Better test if we're running at the cli or in lighty. Also suppress output for the session start if it fails.
Diffstat (limited to 'etc/inc/config.lib.inc')
-rw-r--r-- | etc/inc/config.lib.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index cc82bf0..d6e48e5 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -497,9 +497,9 @@ function write_config($desc="Unknown", $backup = true) { log_error("WARNING! Configuration written on bootup. This can cause stray openvpn and load balancing items in config.xml"); */ - if (!isset($argc)) { + if (!empty($_SERVER['REMOTE_ADDR'])) { if (!session_id()) - session_start(); + @session_start(); if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != "admin")) { $user = getUserEntry($_SESSION['Username']); if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { |