Commit 69ad2a3f authored by Franco Fichtner's avatar Franco Fichtner

globals: thin out a bit more

parent 1cb6d444
<?php
/*
Copyright (C) 2015 Franco Fichtner <franco@opnsense.org>
Copyright (C) 2015-2016 Franco Fichtner <franco@opnsense.org>
Ported from config.inc by Erik Kristensen
Copyright (C) 2004-2010 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
......@@ -29,6 +29,9 @@
POSSIBILITY OF SUCH DAMAGE.
*/
openlog('opnsense', LOG_ODELAY, LOG_USER);
register_shutdown_function('closelog');
require_once("globals.inc");
require_once("xmlparse.inc");
require_once("crypt.inc");
......
......@@ -29,15 +29,11 @@
global $g;
openlog('opnsense', LOG_ODELAY, LOG_USER);
register_shutdown_function('closelog');
$g = array(
"factory_shipped_username" => "root",
"factory_shipped_password" => "opnsense",
"dhcpd_chroot_path" => "/var/dhcpd",
"unbound_chroot_path" => "/var/unbound",
"admin_group" => "admins",
"product_name" => "OPNsense",
"product_website" => "https://opnsense.org",
"product_email" => "project@opnsense.org",
......
......@@ -1369,7 +1369,7 @@ function upgrade_048_to_049() {
/* work around broken gid assignments */
$config['system']['nextgid'] = 2000;
foreach ($config['system']['group'] as & $group) {
if ($group['name'] == $g['admin_group'])
if ($group['name'] == 'admins')
$group['gid'] = 1999;
else
$group['gid'] = $config['system']['nextgid']++;
......@@ -1393,7 +1393,7 @@ function upgrade_048_to_049() {
/* reset group scope information */
foreach ($config['system']['group'] as & $group)
if ($group['name'] != $g['admin_group'])
if ($group['name'] != 'admins')
$group['scope'] = "user";
/* insert new all group */
......
......@@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("globals.inc");
require_once("config.lib.inc");
require_once("util.inc");
require_once("system.inc");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment