summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.lib.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-01-15 11:28:56 -0500
committerjim-p <jimp@pfsense.org>2013-01-15 11:28:56 -0500
commita74260cb3f4811212d6fb4d5ebc0b231bdfa52a6 (patch)
tree351943a24ca76510f27a35659ddc31fb26c3c4f2 /etc/inc/config.lib.inc
parentb3435de108a2291950e147cd321e3e1f4733ff02 (diff)
downloadpfsense-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.inc4
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")) {
OpenPOWER on IntegriCloud