aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/authng/bin/patchbin41056 -> 0 bytes
-rw-r--r--config/authng/diff/authng-fbegin.inc.diff15
-rw-r--r--config/authng/diff/authng-globals.inc.diff16
-rw-r--r--config/authng/diff/authng-guiconfig.inc.diff27
-rw-r--r--config/authng/diff/authng-pfSenseHead.diff2128
-rw-r--r--config/authng/doc/images/pfSense-AuthMethods.pngbin11639 -> 0 bytes
-rw-r--r--config/authng/doc/images/pfSense-Backends.pngbin12499 -> 0 bytes
-rw-r--r--config/authng/doc/images/pfSense-Peers.pngbin12813 -> 0 bytes
-rw-r--r--config/authng/pkg/authng.inc323
-rw-r--r--config/authng/pkg/authng.xml194
-rw-r--r--config/authng/pkg/authng_authgui.inc287
-rw-r--r--config/authng/pkg/authng_authmethods.inc222
-rw-r--r--config/authng/pkg/authng_backends.inc234
-rw-r--r--config/authng/pkg/authng_classdefs.inc479
-rw-r--r--config/authng/pkg/authng_peers.inc501
-rw-r--r--config/authng/pkg/authng_usermanager.inc247
-rw-r--r--config/authng/www/js/headjs.inc157
-rw-r--r--config/authng/www/php/head.inc669
-rw-r--r--config/authng/www/php/system_groupmanager.php797
-rw-r--r--config/authng/www/php/system_usermanager.php84
-rw-r--r--config/authng/www/php/system_usermanager_admin.inc92
-rw-r--r--config/authng/www/php/system_usermanager_admin_index.inc108
-rw-r--r--config/authng/www/php/system_usermanager_admin_newedit.inc167
-rw-r--r--config/authng/www/php/system_usermanager_edit.php294
-rwxr-xr-xconfig/authng/www/php/system_usermanager_settings.php110
-rw-r--r--config/authng/www/php/system_usermanager_user.inc66
-rw-r--r--config/authng/www/wizards/authng_wizard.xml496
27 files changed, 0 insertions, 7713 deletions
diff --git a/config/authng/bin/patch b/config/authng/bin/patch
deleted file mode 100644
index f807fa85..00000000
--- a/config/authng/bin/patch
+++ /dev/null
Binary files differ
diff --git a/config/authng/diff/authng-fbegin.inc.diff b/config/authng/diff/authng-fbegin.inc.diff
deleted file mode 100644
index 8a38c1b4..00000000
--- a/config/authng/diff/authng-fbegin.inc.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: usr/local/www/fbegin.inc
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/fbegin.inc,v
-retrieving revision 1.104.2.37.2.7
-diff -u -r1.104.2.37.2.7 fbegin.inc
---- usr/local/www/fbegin.inc 31 May 2007 03:21:59 -0000 1.104.2.37.2.7
-+++ usr/local/www/fbegin.inc 8 Sep 2007 21:16:29 -0000
-@@ -127,6 +127,7 @@
- <?php endif; ?>
- <li><a href="/wizard.php?xml=setup_wizard.xml" class="navlnk">Setup wizard</a></li>
- <li><a href="/system_routes.php" class="navlnk">Static routes</a></li>
-+ <?php echo return_ext_menu("System"); ?>
- </ul>
- </li>
- <li class="drop">
diff --git a/config/authng/diff/authng-globals.inc.diff b/config/authng/diff/authng-globals.inc.diff
deleted file mode 100644
index 6dea7e6f..00000000
--- a/config/authng/diff/authng-globals.inc.diff
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: globals.inc
-===================================================================
-RCS file: /cvsroot/pfSense/etc/inc/globals.inc,v
-retrieving revision 1.40.2.16
-diff -u -r1.40.2.16 globals.inc
---- globals.inc 27 Feb 2007 20:45:31 -0000 1.40.2.16
-+++ globals.inc 9 Sep 2007 20:54:52 -0000
-@@ -47,6 +47,8 @@
- "cf_conf_path" => "/cf/conf",
- "www_path" => "/usr/local/www",
- "xml_rootobj" => "pfsense",
-+ "admin_group" => "admins",
-+ "product_name" => "pfSense",
- "pppoe_interface" => "ng0",
- "n_pptp_units" => 16, /* this value can be overriden in pptp->n_pptp_units */
- "pptp_subnet" => 28, /* this value can be overriden in pptp->pptp_subnet */
diff --git a/config/authng/diff/authng-guiconfig.inc.diff b/config/authng/diff/authng-guiconfig.inc.diff
deleted file mode 100644
index e65ae8b8..00000000
--- a/config/authng/diff/authng-guiconfig.inc.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: guiconfig.inc
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/guiconfig.inc,v
-retrieving revision 1.90.2.31.2.3
-diff -u -r1.90.2.31.2.3 guiconfig.inc
---- guiconfig.inc 10 May 2007 20:49:41 -0000 1.90.2.31.2.3
-+++ guiconfig.inc 9 Sep 2007 19:43:31 -0000
-@@ -41,7 +41,7 @@
-
- /* Include authentication routines */
- /* THIS MUST BE ABOVE ALL OTHER CODE */
--require_once("auth.inc");
-+require_once("authng_authgui.inc");
-
- /* parse the configuration and include all configuration functions */
- require_once("config.inc");
-@@ -574,10 +574,6 @@
-
- usort($config['shaper']['rule'], "rqpcmp");
- }
--function gentitle($pgname) {
-- global $config;
-- return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname;
--}
-
- /* update the changedesc and changecount(er) variables */
- function update_changedesc($update) {
diff --git a/config/authng/diff/authng-pfSenseHead.diff b/config/authng/diff/authng-pfSenseHead.diff
deleted file mode 100644
index 2a531271..00000000
--- a/config/authng/diff/authng-pfSenseHead.diff
+++ /dev/null
@@ -1,2128 +0,0 @@
-Index: usr/local/www/carp_status.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/carp_status.php,v
-retrieving revision 1.27.2.3
-diff -u -r1.27.2.3 carp_status.php
---- usr/local/www/carp_status.php 3 Apr 2006 21:05:11 -0000 1.27.2.3
-+++ usr/local/www/carp_status.php 8 Sep 2007 18:31:52 -0000
-@@ -56,6 +56,7 @@
-
- $pgtitle = "CARP: Status";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_arp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_arp.php,v
-retrieving revision 1.3.2.4
-diff -u -r1.3.2.4 diag_arp.php
---- usr/local/www/diag_arp.php 19 Mar 2006 22:23:31 -0000 1.3.2.4
-+++ usr/local/www/diag_arp.php 8 Sep 2007 18:32:10 -0000
-@@ -31,6 +31,7 @@
- require("guiconfig.inc");
- $pgtitle = "Diagnostics: ARP Table";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
- <body link="#000000" vlink="#000000" alink="#000000">
- <script src="/javascript/sorttable.js"></script>
-Index: usr/local/www/diag_backup.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_backup.php,v
-retrieving revision 1.70.2.18.2.2
-diff -u -r1.70.2.18.2.2 diag_backup.php
---- usr/local/www/diag_backup.php 3 May 2007 22:16:01 -0000 1.70.2.18.2.2
-+++ usr/local/www/diag_backup.php 8 Sep 2007 18:32:26 -0000
-@@ -225,6 +225,7 @@
-
- $pgtitle = "Diagnostics: Backup/restore";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_confbak.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_confbak.php,v
-retrieving revision 1.20.2.2
-diff -u -r1.20.2.2 diag_confbak.php
---- usr/local/www/diag_confbak.php 2 Jan 2006 23:46:23 -0000 1.20.2.2
-+++ usr/local/www/diag_confbak.php 8 Sep 2007 18:32:54 -0000
-@@ -50,6 +50,7 @@
-
- $pgtitle = "Diagnostics: Configuration History";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_defaults.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_defaults.php,v
-retrieving revision 1.6.4.3
-diff -u -r1.6.4.3 diag_defaults.php
---- usr/local/www/diag_defaults.php 28 Apr 2006 02:27:19 -0000 1.6.4.3
-+++ usr/local/www/diag_defaults.php 8 Sep 2007 18:32:58 -0000
-@@ -46,6 +46,7 @@
-
- $pgtitle = "Diagnostics: Factory defaults";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_dhcp_leases.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_dhcp_leases.php,v
-retrieving revision 1.11.2.17
-diff -u -r1.11.2.17 diag_dhcp_leases.php
---- usr/local/www/diag_dhcp_leases.php 2 Mar 2007 15:31:08 -0000 1.11.2.17
-+++ usr/local/www/diag_dhcp_leases.php 8 Sep 2007 18:33:04 -0000
-@@ -35,6 +35,7 @@
-
- $pgtitle = "Diagnostics: DHCP leases";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_dump_states.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_dump_states.php,v
-retrieving revision 1.10.2.14.2.1
-diff -u -r1.10.2.14.2.1 diag_dump_states.php
---- usr/local/www/diag_dump_states.php 11 May 2007 17:21:06 -0000 1.10.2.14.2.1
-+++ usr/local/www/diag_dump_states.php 8 Sep 2007 18:33:11 -0000
-@@ -30,6 +30,7 @@
-
- $pgtitle = "Diagnostics: Show States";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- /* handle AJAX operations */
- if($_GET['action']) {
-Index: usr/local/www/diag_ipsec_sad.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_ipsec_sad.php,v
-retrieving revision 1.12.2.3
-diff -u -r1.12.2.3 diag_ipsec_sad.php
---- usr/local/www/diag_ipsec_sad.php 3 Apr 2006 21:05:11 -0000 1.12.2.3
-+++ usr/local/www/diag_ipsec_sad.php 8 Sep 2007 18:33:18 -0000
-@@ -35,6 +35,7 @@
-
- $pgtitle = "Diagnostics: IPSec: SA";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_ipsec_spd.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_ipsec_spd.php,v
-retrieving revision 1.12.2.2
-diff -u -r1.12.2.2 diag_ipsec_spd.php
---- usr/local/www/diag_ipsec_spd.php 2 Jan 2006 23:46:23 -0000 1.12.2.2
-+++ usr/local/www/diag_ipsec_spd.php 8 Sep 2007 18:33:22 -0000
-@@ -35,6 +35,7 @@
-
- $pgtitle = "Diagnostics: IPSec: SPD";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs.php,v
-retrieving revision 1.32.2.11
-diff -u -r1.32.2.11 diag_logs.php
---- usr/local/www/diag_logs.php 9 Oct 2006 00:19:17 -0000 1.32.2.11
-+++ usr/local/www/diag_logs.php 8 Sep 2007 18:33:30 -0000
-@@ -56,6 +56,7 @@
-
- $pgtitle = "Diagnostics: System logs: System";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs_auth.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_auth.php,v
-retrieving revision 1.19.2.4
-diff -u -r1.19.2.4 diag_logs_auth.php
---- usr/local/www/diag_logs_auth.php 5 Oct 2006 21:51:02 -0000 1.19.2.4
-+++ usr/local/www/diag_logs_auth.php 8 Sep 2007 18:33:38 -0000
-@@ -43,6 +43,7 @@
-
- $pgtitle = "Diagnostics: System logs: Portal Auth";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs_dhcp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_dhcp.php,v
-retrieving revision 1.19.2.4
-diff -u -r1.19.2.4 diag_logs_dhcp.php
---- usr/local/www/diag_logs_dhcp.php 5 Oct 2006 21:51:02 -0000 1.19.2.4
-+++ usr/local/www/diag_logs_dhcp.php 8 Sep 2007 18:33:43 -0000
-@@ -45,6 +45,7 @@
-
- $pgtitle = "Diagnostics: System logs: DHCP";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs_filter.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_filter.php,v
-retrieving revision 1.46.2.33.2.1
-diff -u -r1.46.2.33.2.1 diag_logs_filter.php
---- usr/local/www/diag_logs_filter.php 5 Jul 2007 22:31:03 -0000 1.46.2.33.2.1
-+++ usr/local/www/diag_logs_filter.php 8 Sep 2007 18:33:53 -0000
-@@ -173,6 +173,7 @@
-
- $pgtitle = "Diagnostics: System logs: Firewall";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_logs_filter_dynamic.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/diag_logs_filter_dynamic.php,v
-retrieving revision 1.13.2.16.2.2
-diff -u -r1.13.2.16.2.2 diag_logs_filter_dynamic.php
---- usr/local/www/diag_logs_filter_dynamic.php 4 Jul 2007 20:14:26 -0000 1.13.2.16.2.2
-+++ usr/local/www/diag_logs_filter_dynamic.php 8 Sep 2007 18:34:01 -0000
-@@ -157,6 +157,7 @@
-
- $pgtitle = "Diagnostics: System logs: Firewall";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_logs_ipsec.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_ipsec.php,v
-retrieving revision 1.30.2.5
-diff -u -r1.30.2.5 diag_logs_ipsec.php
---- usr/local/www/diag_logs_ipsec.php 5 Oct 2006 21:51:02 -0000 1.30.2.5
-+++ usr/local/www/diag_logs_ipsec.php 8 Sep 2007 18:35:14 -0000
-@@ -47,6 +47,7 @@
-
- $pgtitle = "Diagnostics: System logs: IPSEC VPN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_logs_ntpd.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_ntpd.php,v
-retrieving revision 1.1.2.4
-diff -u -r1.1.2.4 diag_logs_ntpd.php
---- usr/local/www/diag_logs_ntpd.php 22 Oct 2006 05:30:56 -0000 1.1.2.4
-+++ usr/local/www/diag_logs_ntpd.php 8 Sep 2007 18:35:19 -0000
-@@ -45,6 +45,7 @@
-
- $pgtitle = "Diagnostics: System logs: OpenNTPD";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs_openvpn.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_openvpn.php,v
-retrieving revision 1.2.2.8
-diff -u -r1.2.2.8 diag_logs_openvpn.php
---- usr/local/www/diag_logs_openvpn.php 5 Oct 2006 21:51:02 -0000 1.2.2.8
-+++ usr/local/www/diag_logs_openvpn.php 8 Sep 2007 18:35:24 -0000
-@@ -48,6 +48,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_logs_settings.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_settings.php,v
-retrieving revision 1.18.2.8
-diff -u -r1.18.2.8 diag_logs_settings.php
---- usr/local/www/diag_logs_settings.php 5 Oct 2006 21:51:02 -0000 1.18.2.8
-+++ usr/local/www/diag_logs_settings.php 8 Sep 2007 18:35:31 -0000
-@@ -94,6 +94,7 @@
-
- $pgtitle = "Diagnostics: System logs: Settings";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs_slbd.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_slbd.php,v
-retrieving revision 1.3.2.5
-diff -u -r1.3.2.5 diag_logs_slbd.php
---- usr/local/www/diag_logs_slbd.php 5 Oct 2006 21:51:02 -0000 1.3.2.5
-+++ usr/local/www/diag_logs_slbd.php 8 Sep 2007 18:35:36 -0000
-@@ -46,6 +46,7 @@
-
- $pgtitle = "Diagnostics: System logs: Load Balancer";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/diag_logs_vpn.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_logs_vpn.php,v
-retrieving revision 1.26.2.8
-diff -u -r1.26.2.8 diag_logs_vpn.php
---- usr/local/www/diag_logs_vpn.php 22 Oct 2006 05:30:56 -0000 1.26.2.8
-+++ usr/local/www/diag_logs_vpn.php 8 Sep 2007 18:35:43 -0000
-@@ -70,6 +70,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_packet_capture.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_packet_capture.php,v
-retrieving revision 1.2.2.4.2.5
-diff -u -r1.2.2.4.2.5 diag_packet_capture.php
---- usr/local/www/diag_packet_capture.php 1 Jul 2007 05:09:05 -0000 1.2.2.4.2.5
-+++ usr/local/www/diag_packet_capture.php 8 Sep 2007 18:35:53 -0000
-@@ -106,7 +106,9 @@
-
- }
- $pgtitle = "Diagnostics: Packet Capture";
--include("head.inc"); ?>
-+include("head.inc");
-+echo $pfSenseHead->getHTML();
-+?>
- <body link="#000000" vlink="#0000CC" alink="#0000CC">
- <? include("fbegin.inc"); ?>
-
-Index: usr/local/www/diag_ping.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/diag_ping.php,v
-retrieving revision 1.8.2.6
-diff -u -r1.8.2.6 diag_ping.php
---- usr/local/www/diag_ping.php 25 Apr 2006 22:06:42 -0000 1.8.2.6
-+++ usr/local/www/diag_ping.php 8 Sep 2007 18:36:01 -0000
-@@ -86,7 +86,9 @@
- }
-
- $pgtitle = "Diagnostics: Ping";
--include("head.inc"); ?>
-+include("head.inc");
-+echo $pfSenseHead->getHTML();
-+?>
- <body link="#000000" vlink="#000000" alink="#000000">
- <? include("fbegin.inc"); ?>
- <p class="pgtitle"><?=$pgtitle?></p>
-Index: usr/local/www/diag_pkglogs.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_pkglogs.php,v
-retrieving revision 1.20.4.1
-diff -u -r1.20.4.1 diag_pkglogs.php
---- usr/local/www/diag_pkglogs.php 2 Jan 2006 23:46:23 -0000 1.20.4.1
-+++ usr/local/www/diag_pkglogs.php 8 Sep 2007 18:36:08 -0000
-@@ -68,6 +68,7 @@
-
- $pgtitle = "Diagnostics: Package logs";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_resetstate.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_resetstate.php,v
-retrieving revision 1.6.4.2
-diff -u -r1.6.4.2 diag_resetstate.php
---- usr/local/www/diag_resetstate.php 2 Jan 2006 23:46:23 -0000 1.6.4.2
-+++ usr/local/www/diag_resetstate.php 8 Sep 2007 18:36:12 -0000
-@@ -45,6 +45,7 @@
-
- $pgtitle = "Diagnostics: Reset state";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/diag_routes.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/diag_routes.php,v
-retrieving revision 1.2.2.4
-diff -u -r1.2.2.4 diag_routes.php
---- usr/local/www/diag_routes.php 11 Mar 2006 08:25:22 -0000 1.2.2.4
-+++ usr/local/www/diag_routes.php 8 Sep 2007 18:36:16 -0000
-@@ -34,6 +34,7 @@
- $pgtitle = 'Diagnostics: Routing tables';
-
- include('head.inc');
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#000000" vlink="#000000" alink="#000000">
-Index: usr/local/www/diag_traceroute.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/diag_traceroute.php,v
-retrieving revision 1.4.2.7
-diff -u -r1.4.2.7 diag_traceroute.php
---- usr/local/www/diag_traceroute.php 25 Apr 2006 22:06:42 -0000 1.4.2.7
-+++ usr/local/www/diag_traceroute.php 8 Sep 2007 18:36:24 -0000
-@@ -32,6 +32,7 @@
- require("guiconfig.inc");
- $pgtitle = "Diagnostics: Traceroute";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
- <body link="#000000" vlink="#000000" alink="#000000">
- <? include("fbegin.inc"); ?>
-Index: usr/local/www/edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/edit.php,v
-retrieving revision 1.35.2.5
-diff -u -r1.35.2.5 edit.php
---- usr/local/www/edit.php 26 Sep 2006 22:49:53 -0000 1.35.2.5
-+++ usr/local/www/edit.php 8 Sep 2007 19:09:08 -0000
-@@ -133,6 +133,7 @@
- $pgtitle = "Diagnostics: Edit File";
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/exec.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/exec.php,v
-retrieving revision 1.10.4.9
-diff -u -r1.10.4.9 exec.php
---- usr/local/www/exec.php 20 Mar 2007 18:38:33 -0000 1.10.4.9
-+++ usr/local/www/exec.php 8 Sep 2007 19:09:08 -0000
-@@ -52,6 +52,7 @@
-
- $pgtitle = "Diagnostics: Execute command";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
-
- <script language="javascript">
-Index: usr/local/www/firewall_aliases.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_aliases.php,v
-retrieving revision 1.21.2.10.2.1
-diff -u -r1.21.2.10.2.1 firewall_aliases.php
---- usr/local/www/firewall_aliases.php 8 May 2007 22:06:49 -0000 1.21.2.10.2.1
-+++ usr/local/www/firewall_aliases.php 8 Sep 2007 18:36:53 -0000
-@@ -144,7 +144,7 @@
-
- $pgtitle = "Firewall: Aliases";
- include("head.inc");
--
-+echo $pfSenseHead->getHTML();
- ?>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/firewall_aliases_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_aliases_edit.php,v
-retrieving revision 1.25.2.12.2.1
-diff -u -r1.25.2.12.2.1 firewall_aliases_edit.php
---- usr/local/www/firewall_aliases_edit.php 2 May 2007 12:43:56 -0000 1.25.2.12.2.1
-+++ usr/local/www/firewall_aliases_edit.php 8 Sep 2007 18:40:54 -0000
-@@ -284,6 +284,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- $jscriptstr = <<<EOD
-
-@@ -400,12 +401,13 @@
-
- EOD;
-
-+$pfSenseHead->addScript($jscriptstr);
-+echo $pfSenseHead->getHTML();
- ?>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?= $jsevents["body"]["onload"] ?>">
- <?php
- include("fbegin.inc");
-- echo $jscriptstr;
- ?>
-
- <script type="text/javascript" src="row_helper.js">
-Index: usr/local/www/firewall_nat.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat.php,v
-retrieving revision 1.31.2.15.2.1
-diff -u -r1.31.2.15.2.1 firewall_nat.php
---- usr/local/www/firewall_nat.php 8 May 2007 22:06:49 -0000 1.31.2.15.2.1
-+++ usr/local/www/firewall_nat.php 8 Sep 2007 18:41:11 -0000
-@@ -134,6 +134,7 @@
-
- $pgtitle = "Firewall: NAT: Port Forward";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#000000" vlink="#000000" alink="#000000">
-Index: usr/local/www/firewall_nat_1to1.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_1to1.php,v
-retrieving revision 1.20.2.2.2.1
-diff -u -r1.20.2.2.2.1 firewall_nat_1to1.php
---- usr/local/www/firewall_nat_1to1.php 8 May 2007 22:06:49 -0000 1.20.2.2.2.1
-+++ usr/local/www/firewall_nat_1to1.php 8 Sep 2007 18:41:22 -0000
-@@ -71,6 +71,7 @@
-
- $pgtitle = "Firewall: NAT: 1:1";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/firewall_nat_1to1_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_1to1_edit.php,v
-retrieving revision 1.9.2.2
-diff -u -r1.9.2.2 firewall_nat_1to1_edit.php
---- usr/local/www/firewall_nat_1to1_edit.php 2 Jan 2006 23:46:23 -0000 1.9.2.2
-+++ usr/local/www/firewall_nat_1to1_edit.php 8 Sep 2007 19:09:08 -0000
-@@ -130,6 +130,7 @@
-
- $pgtitle = "Firewall: NAT: 1:1: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_nat_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_edit.php,v
-retrieving revision 1.30.2.19
-diff -u -r1.30.2.19 firewall_nat_edit.php
---- usr/local/www/firewall_nat_edit.php 27 Dec 2006 07:49:18 -0000 1.30.2.19
-+++ usr/local/www/firewall_nat_edit.php 8 Sep 2007 18:41:35 -0000
-@@ -257,6 +257,7 @@
-
- $pgtitle = "Firewall: NAT: Port Forward: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_nat_out.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_out.php,v
-retrieving revision 1.47.2.16.2.3
-diff -u -r1.47.2.16.2.3 firewall_nat_out.php
---- usr/local/www/firewall_nat_out.php 9 May 2007 15:42:19 -0000 1.47.2.16.2.3
-+++ usr/local/www/firewall_nat_out.php 8 Sep 2007 18:41:42 -0000
-@@ -177,6 +177,7 @@
-
- $pgtitle = "Firewall: NAT: Outbound";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/firewall_nat_out_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_out_edit.php,v
-retrieving revision 1.26.2.19
-diff -u -r1.26.2.19 firewall_nat_out_edit.php
---- usr/local/www/firewall_nat_out_edit.php 6 Sep 2006 17:49:16 -0000 1.26.2.19
-+++ usr/local/www/firewall_nat_out_edit.php 8 Sep 2007 18:44:06 -0000
-@@ -238,6 +238,8 @@
- $pgtitle = "Firewall: NAT: Outbound: Edit";
- $closehead = false;
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_nat_server.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_server.php,v
-retrieving revision 1.17.4.2
-diff -u -r1.17.4.2 firewall_nat_server.php
---- usr/local/www/firewall_nat_server.php 2 Jan 2006 23:46:24 -0000 1.17.4.2
-+++ usr/local/www/firewall_nat_server.php 8 Sep 2007 18:44:22 -0000
-@@ -83,6 +83,7 @@
-
- $pgtitle = "Firewall: NAT: NAT Addresses";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/firewall_nat_server_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_nat_server_edit.php,v
-retrieving revision 1.8.4.2
-diff -u -r1.8.4.2 firewall_nat_server_edit.php
---- usr/local/www/firewall_nat_server_edit.php 2 Jan 2006 23:46:24 -0000 1.8.4.2
-+++ usr/local/www/firewall_nat_server_edit.php 8 Sep 2007 18:44:27 -0000
-@@ -113,6 +113,7 @@
-
- $pgtitle = "Firewall: NAT: NAT Addresses: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_rules.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_rules.php,v
-retrieving revision 1.42.2.17.2.6
-diff -u -r1.42.2.17.2.6 firewall_rules.php
---- usr/local/www/firewall_rules.php 5 Jul 2007 22:35:33 -0000 1.42.2.17.2.6
-+++ usr/local/www/firewall_rules.php 8 Sep 2007 18:45:02 -0000
-@@ -171,6 +171,8 @@
-
- $pgtitle = "Firewall: Rules";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
- echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domTT.js\"></script>";
-Index: usr/local/www/firewall_rules_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_rules_edit.php,v
-retrieving revision 1.86.2.34.2.3
-diff -u -r1.86.2.34.2.3 firewall_rules_edit.php
---- usr/local/www/firewall_rules_edit.php 1 Jun 2007 17:12:12 -0000 1.86.2.34.2.3
-+++ usr/local/www/firewall_rules_edit.php 8 Sep 2007 18:45:23 -0000
-@@ -349,10 +349,9 @@
-
- $page_filename = "firewall_rules_edit.php";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
--
--</head>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/firewall_schedule.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_schedule.php,v
-retrieving revision 1.1.2.7.2.2
-diff -u -r1.1.2.7.2.2 firewall_schedule.php
---- usr/local/www/firewall_schedule.php 9 May 2007 02:09:06 -0000 1.1.2.7.2.2
-+++ usr/local/www/firewall_schedule.php 8 Sep 2007 18:45:43 -0000
-@@ -75,6 +75,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/firewall_schedule_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_schedule_edit.php,v
-retrieving revision 1.1.2.15.2.2
-diff -u -r1.1.2.15.2.2 firewall_schedule_edit.php
---- usr/local/www/firewall_schedule_edit.php 7 May 2007 11:46:55 -0000 1.1.2.15.2.2
-+++ usr/local/www/firewall_schedule_edit.php 8 Sep 2007 18:46:49 -0000
-@@ -725,6 +725,9 @@
-
- </script>
- EOD;
-+
-+$pfSenseHead->addScript($jscriptstr);
-+echo $pfSenseHead->getHTML();
- ?>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?= $jsevents["body"]["onload"] ?>">
-Index: usr/local/www/firewall_shaper.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_shaper.php,v
-retrieving revision 1.41.2.10
-diff -u -r1.41.2.10 firewall_shaper.php
---- usr/local/www/firewall_shaper.php 25 Mar 2006 00:14:06 -0000 1.41.2.10
-+++ usr/local/www/firewall_shaper.php 8 Sep 2007 18:47:46 -0000
-@@ -189,6 +189,7 @@
-
- $pgtitle = "Firewall: Shaper: Rules";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_shaper_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_shaper_edit.php,v
-retrieving revision 1.28.2.6
-diff -u -r1.28.2.6 firewall_shaper_edit.php
---- usr/local/www/firewall_shaper_edit.php 24 Apr 2006 18:41:52 -0000 1.28.2.6
-+++ usr/local/www/firewall_shaper_edit.php 8 Sep 2007 18:48:15 -0000
-@@ -291,6 +291,8 @@
- $pgtitle = "Firewall: Shaper: Rules: Edit";
- $closehead = false;
- include("head.inc");
-+$pfSenseHead->setCloseHead();
-+echo $pfSenseHead->getHTML();
- ?>
-
- <script language="JavaScript">
-Index: usr/local/www/firewall_shaper_queues.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_shaper_queues.php,v
-retrieving revision 1.51.2.4
-diff -u -r1.51.2.4 firewall_shaper_queues.php
---- usr/local/www/firewall_shaper_queues.php 2 Jan 2006 23:46:24 -0000 1.51.2.4
-+++ usr/local/www/firewall_shaper_queues.php 8 Sep 2007 18:48:26 -0000
-@@ -157,6 +157,7 @@
-
- $pgtitle = "Firewall: Shaper: Queues";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_shaper_queues_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_shaper_queues_edit.php,v
-retrieving revision 1.59.2.11
-diff -u -r1.59.2.11 firewall_shaper_queues_edit.php
---- usr/local/www/firewall_shaper_queues_edit.php 21 Aug 2006 03:25:24 -0000 1.59.2.11
-+++ usr/local/www/firewall_shaper_queues_edit.php 8 Sep 2007 18:48:32 -0000
-@@ -240,6 +240,7 @@
-
- $pgtitle = "Firewall: Shaper: Queues: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/firewall_virtual_ip.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_virtual_ip.php,v
-retrieving revision 1.9.2.6.2.10
-diff -u -r1.9.2.6.2.10 firewall_virtual_ip.php
---- usr/local/www/firewall_virtual_ip.php 21 May 2007 19:28:20 -0000 1.9.2.6.2.10
-+++ usr/local/www/firewall_virtual_ip.php 8 Sep 2007 18:48:38 -0000
-@@ -80,6 +80,7 @@
-
- $pgtitle = "Firewall: Virtual IP Addresses";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/firewall_virtual_ip_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/firewall_virtual_ip_edit.php,v
-retrieving revision 1.11.2.23
-diff -u -r1.11.2.23 firewall_virtual_ip_edit.php
---- usr/local/www/firewall_virtual_ip_edit.php 27 Feb 2007 17:09:46 -0000 1.11.2.23
-+++ usr/local/www/firewall_virtual_ip_edit.php 8 Sep 2007 18:48:44 -0000
-@@ -205,6 +205,7 @@
-
- $pgtitle = "Firewall: Virtual IP Address: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/halt.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/halt.php,v
-retrieving revision 1.6.4.1
-diff -u -r1.6.4.1 halt.php
---- usr/local/www/halt.php 2 Jan 2006 23:46:24 -0000 1.6.4.1
-+++ usr/local/www/halt.php 8 Sep 2007 18:48:57 -0000
-@@ -46,6 +46,7 @@
-
- $pgtitle = "Diagnostics: Halt system";
- include('head.inc');
-+echo $pfSenseHead->getHTML();
- ?>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/index.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/index.php,v
-retrieving revision 1.88.2.9
-diff -u -r1.88.2.9 index.php
---- usr/local/www/index.php 21 May 2006 23:26:30 -0000 1.88.2.9
-+++ usr/local/www/index.php 8 Sep 2007 18:51:09 -0000
-@@ -80,6 +80,7 @@
-
- $pgtitle = 'pfSense first time setup';
- include('head.inc');
-+ echo $pfSenseHead->getHTML();
-
- echo "<body link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";
- echo "<form>\n";
-@@ -118,6 +119,7 @@
- ## Set Page Title and Include Header
- $pgtitle = "pfSense webGUI";
- include("head.inc");
-+ echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/interfaces_assign.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_assign.php,v
-retrieving revision 1.13.2.11.2.2
-diff -u -r1.13.2.11.2.2 interfaces_assign.php
---- usr/local/www/interfaces_assign.php 24 Apr 2007 01:00:36 -0000 1.13.2.11.2.2
-+++ usr/local/www/interfaces_assign.php 8 Sep 2007 18:51:21 -0000
-@@ -193,6 +193,7 @@
-
- $pgtitle = "Interfaces: Assign";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- if(file_exists("/var/run/interface_mismatch_reboot_needed"))
- if ($_POST)
-Index: usr/local/www/interfaces_lan.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_lan.php,v
-retrieving revision 1.49.2.23.2.1
-diff -u -r1.49.2.23.2.1 interfaces_lan.php
---- usr/local/www/interfaces_lan.php 6 Jul 2007 18:10:05 -0000 1.49.2.23.2.1
-+++ usr/local/www/interfaces_lan.php 8 Sep 2007 18:51:29 -0000
-@@ -138,6 +138,7 @@
-
- $pgtitle = "Interfaces: LAN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/interfaces_opt.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_opt.php,v
-retrieving revision 1.56.2.25
-diff -u -r1.56.2.25 interfaces_opt.php
---- usr/local/www/interfaces_opt.php 9 Jan 2007 17:40:16 -0000 1.56.2.25
-+++ usr/local/www/interfaces_opt.php 8 Sep 2007 18:52:02 -0000
-@@ -228,6 +228,8 @@
-
- $pgtitle = "Interfaces: Optional {$index} (" . htmlspecialchars($optcfg['descr']) . ")";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/interfaces_vlan.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_vlan.php,v
-retrieving revision 1.9.2.3
-diff -u -r1.9.2.3 interfaces_vlan.php
---- usr/local/www/interfaces_vlan.php 25 Jan 2007 22:26:20 -0000 1.9.2.3
-+++ usr/local/www/interfaces_vlan.php 8 Sep 2007 18:52:16 -0000
-@@ -88,6 +88,7 @@
-
- $pgtitle = "Interfaces: VLAN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/interfaces_vlan_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_vlan_edit.php,v
-retrieving revision 1.10.2.4
-diff -u -r1.10.2.4 interfaces_vlan_edit.php
---- usr/local/www/interfaces_vlan_edit.php 14 Mar 2007 21:15:41 -0000 1.10.2.4
-+++ usr/local/www/interfaces_vlan_edit.php 8 Sep 2007 18:52:28 -0000
-@@ -98,6 +98,7 @@
-
- $pgtitle = "Firewall: VLAN: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/interfaces_wan.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_wan.php,v
-retrieving revision 1.37.2.24.2.1
-diff -u -r1.37.2.24.2.1 interfaces_wan.php
---- usr/local/www/interfaces_wan.php 17 May 2007 13:52:34 -0000 1.37.2.24.2.1
-+++ usr/local/www/interfaces_wan.php 8 Sep 2007 19:09:08 -0000
-@@ -519,6 +519,8 @@
- $pgtitle = "Interfaces: WAN";
- $closehead = false;
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/interfaces_wlan_scan.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/interfaces_wlan_scan.php,v
-retrieving revision 1.3.2.1
-diff -u -r1.3.2.1 interfaces_wlan_scan.php
---- usr/local/www/interfaces_wlan_scan.php 2 Jan 2006 23:46:24 -0000 1.3.2.1
-+++ usr/local/www/interfaces_wlan_scan.php 8 Sep 2007 18:53:12 -0000
-@@ -36,6 +36,7 @@
-
- $pgtitle = "Interfaces: Scan Wireless";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/license.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/license.php,v
-retrieving revision 1.6.4.5
-diff -u -r1.6.4.5 license.php
---- usr/local/www/license.php 23 Feb 2007 00:40:28 -0000 1.6.4.5
-+++ usr/local/www/license.php 8 Sep 2007 18:53:20 -0000
-@@ -3,6 +3,7 @@
- require("guiconfig.inc");
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
-
-
-Index: usr/local/www/load_balancer_pool.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/load_balancer_pool.php,v
-retrieving revision 1.5.2.6.2.1
-diff -u -r1.5.2.6.2.1 load_balancer_pool.php
---- usr/local/www/load_balancer_pool.php 8 May 2007 22:06:49 -0000 1.5.2.6.2.1
-+++ usr/local/www/load_balancer_pool.php 8 Sep 2007 18:53:27 -0000
-@@ -76,6 +76,7 @@
-
- $pgtitle = "Load Balancer: Pool";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/load_balancer_pool_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/load_balancer_pool_edit.php,v
-retrieving revision 1.24.2.23.2.2
-diff -u -r1.24.2.23.2.2 load_balancer_pool_edit.php
---- usr/local/www/load_balancer_pool_edit.php 20 Jun 2007 23:24:56 -0000 1.24.2.23.2.2
-+++ usr/local/www/load_balancer_pool_edit.php 8 Sep 2007 18:53:32 -0000
-@@ -165,6 +165,7 @@
-
- $pgtitle = "Load Balancer: Pool: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/load_balancer_virtual_server.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/load_balancer_virtual_server.php,v
-retrieving revision 1.6.2.1.2.1
-diff -u -r1.6.2.1.2.1 load_balancer_virtual_server.php
---- usr/local/www/load_balancer_virtual_server.php 8 May 2007 22:06:49 -0000 1.6.2.1.2.1
-+++ usr/local/www/load_balancer_virtual_server.php 8 Sep 2007 18:53:38 -0000
-@@ -66,6 +66,7 @@
-
- $pgtitle = "Services: Load Balancer: Virtual Servers";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/load_balancer_virtual_server_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/load_balancer_virtual_server_edit.php,v
-retrieving revision 1.16.2.5
-diff -u -r1.16.2.5 load_balancer_virtual_server_edit.php
---- usr/local/www/load_balancer_virtual_server_edit.php 28 May 2006 18:53:19 -0000 1.16.2.5
-+++ usr/local/www/load_balancer_virtual_server_edit.php 8 Sep 2007 18:53:45 -0000
-@@ -113,6 +113,7 @@
-
- $pgtitle = "Load Balancer: Virtual Server: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/pkg.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/pkg.php,v
-retrieving revision 1.41.4.4
-diff -u -r1.41.4.4 pkg.php
---- usr/local/www/pkg.php 21 Feb 2007 03:56:09 -0000 1.41.4.4
-+++ usr/local/www/pkg.php 8 Sep 2007 18:54:16 -0000
-@@ -99,6 +99,7 @@
-
- $pgtitle = $title;
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/pkg_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/pkg_edit.php,v
-retrieving revision 1.90.2.24
-diff -u -r1.90.2.24 pkg_edit.php
---- usr/local/www/pkg_edit.php 20 Jan 2007 20:52:51 -0000 1.90.2.24
-+++ usr/local/www/pkg_edit.php 8 Sep 2007 18:54:41 -0000
-@@ -102,9 +102,10 @@
- } else {
- if($pkg['custom_add_php_command']) {
- if($pkg['donotsave'] <> "" or $pkg['preoutput'] <> "") {
-- ?>
-
--<?php include("head.inc"); ?>
-+include("head.inc");
-+echo $pfSenseHead->getHTML();
-+?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
- <?php
-Index: usr/local/www/pkg_mgr.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/pkg_mgr.php,v
-retrieving revision 1.64.2.12
-diff -u -r1.64.2.12 pkg_mgr.php
---- usr/local/www/pkg_mgr.php 25 Aug 2006 23:04:56 -0000 1.64.2.12
-+++ usr/local/www/pkg_mgr.php 8 Sep 2007 18:55:09 -0000
-@@ -54,6 +54,7 @@
-
- $pgtitle = "System: Package Manager";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/pkg_mgr_install.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/pkg_mgr_install.php,v
-retrieving revision 1.147.2.10
-diff -u -r1.147.2.10 pkg_mgr_install.php
---- usr/local/www/pkg_mgr_install.php 2 Feb 2007 17:47:53 -0000 1.147.2.10
-+++ usr/local/www/pkg_mgr_install.php 8 Sep 2007 18:55:12 -0000
-@@ -39,6 +39,7 @@
-
- $pgtitle = "System: Package Manager: Install Package";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/pkg_mgr_installed.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/pkg_mgr_installed.php,v
-retrieving revision 1.43.4.5
-diff -u -r1.43.4.5 pkg_mgr_installed.php
---- usr/local/www/pkg_mgr_installed.php 25 Aug 2006 23:04:57 -0000 1.43.4.5
-+++ usr/local/www/pkg_mgr_installed.php 8 Sep 2007 18:55:17 -0000
-@@ -39,6 +39,7 @@
-
- $pgtitle = "System: Package Manager";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/reboot.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/reboot.php,v
-retrieving revision 1.7.2.5
-diff -u -r1.7.2.5 reboot.php
---- usr/local/www/reboot.php 11 Feb 2006 03:04:21 -0000 1.7.2.5
-+++ usr/local/www/reboot.php 8 Sep 2007 18:55:31 -0000
-@@ -42,6 +42,7 @@
-
- $pgtitle = "Diagnostics: Reboot System";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/restart_httpd.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/restart_httpd.php,v
-retrieving revision 1.3.2.1
-diff -u -r1.3.2.1 restart_httpd.php
---- usr/local/www/restart_httpd.php 2 Jan 2006 23:46:24 -0000 1.3.2.1
-+++ usr/local/www/restart_httpd.php 8 Sep 2007 18:55:37 -0000
-@@ -30,6 +30,7 @@
- require_once("system.inc");
- $pgtitle = "Restarting mini_httpd";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/services_captiveportal.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal.php,v
-retrieving revision 1.51.2.23.2.1
-diff -u -r1.51.2.23.2.1 services_captiveportal.php
---- usr/local/www/services_captiveportal.php 9 May 2007 02:09:43 -0000 1.51.2.23.2.1
-+++ usr/local/www/services_captiveportal.php 8 Sep 2007 18:56:01 -0000
-@@ -197,6 +197,8 @@
- }
- }
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
- ?>
- <?php include("fbegin.inc"); ?>
- <script language="JavaScript">
-Index: usr/local/www/services_captiveportal_filemanager.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_filemanager.php,v
-retrieving revision 1.4.2.4.2.2
-diff -u -r1.4.2.4.2.2 services_captiveportal_filemanager.php
---- usr/local/www/services_captiveportal_filemanager.php 9 May 2007 02:09:43 -0000 1.4.2.4.2.2
-+++ usr/local/www/services_captiveportal_filemanager.php 8 Sep 2007 18:56:24 -0000
-@@ -98,6 +98,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/services_captiveportal_ip.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_ip.php,v
-retrieving revision 1.30.2.6.2.2
-diff -u -r1.30.2.6.2.2 services_captiveportal_ip.php
---- usr/local/www/services_captiveportal_ip.php 9 May 2007 02:09:43 -0000 1.30.2.6.2.2
-+++ usr/local/www/services_captiveportal_ip.php 8 Sep 2007 18:56:32 -0000
-@@ -69,6 +69,7 @@
-
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
- <?php include("fbegin.inc"); ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/services_captiveportal_ip_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_ip_edit.php,v
-retrieving revision 1.17.2.2.2.1
-diff -u -r1.17.2.2.2.1 services_captiveportal_ip_edit.php
---- usr/local/www/services_captiveportal_ip_edit.php 9 May 2007 02:09:43 -0000 1.17.2.2.2.1
-+++ usr/local/www/services_captiveportal_ip_edit.php 8 Sep 2007 18:56:39 -0000
-@@ -93,6 +93,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/services_captiveportal_mac.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_mac.php,v
-retrieving revision 1.35.2.6.2.1
-diff -u -r1.35.2.6.2.1 services_captiveportal_mac.php
---- usr/local/www/services_captiveportal_mac.php 9 May 2007 02:09:43 -0000 1.35.2.6.2.1
-+++ usr/local/www/services_captiveportal_mac.php 8 Sep 2007 18:56:45 -0000
-@@ -68,6 +68,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/services_captiveportal_mac_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_mac_edit.php,v
-retrieving revision 1.16.2.2.2.1
-diff -u -r1.16.2.2.2.1 services_captiveportal_mac_edit.php
---- usr/local/www/services_captiveportal_mac_edit.php 9 May 2007 02:09:43 -0000 1.16.2.2.2.1
-+++ usr/local/www/services_captiveportal_mac_edit.php 8 Sep 2007 18:57:06 -0000
-@@ -92,6 +92,7 @@
- }
- }
- include("head.inc");
-+echo $pfSenseHead->getHTML();
- ?>
- <?php include("fbegin.inc"); ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/services_captiveportal_users.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_users.php,v
-retrieving revision 1.24.2.3.2.2
-diff -u -r1.24.2.3.2.2 services_captiveportal_users.php
---- usr/local/www/services_captiveportal_users.php 9 May 2007 02:09:43 -0000 1.24.2.3.2.2
-+++ usr/local/www/services_captiveportal_users.php 8 Sep 2007 18:57:13 -0000
-@@ -63,6 +63,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/services_captiveportal_users_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_captiveportal_users_edit.php,v
-retrieving revision 1.7.2.3.2.1
-diff -u -r1.7.2.3.2.1 services_captiveportal_users_edit.php
---- usr/local/www/services_captiveportal_users_edit.php 9 May 2007 02:09:43 -0000 1.7.2.3.2.1
-+++ usr/local/www/services_captiveportal_users_edit.php 8 Sep 2007 18:57:20 -0000
-@@ -124,6 +124,7 @@
- }
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/services_dhcp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dhcp.php,v
-retrieving revision 1.38.2.18.2.2
-diff -u -r1.38.2.18.2.2 services_dhcp.php
---- usr/local/www/services_dhcp.php 8 May 2007 22:06:49 -0000 1.38.2.18.2.2
-+++ usr/local/www/services_dhcp.php 8 Sep 2007 18:57:42 -0000
-@@ -255,6 +255,8 @@
-
- $pgtitle = "Services: DHCP server";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false):
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_dhcp_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dhcp_edit.php,v
-retrieving revision 1.18.2.5.2.1
-diff -u -r1.18.2.5.2.1 services_dhcp_edit.php
---- usr/local/www/services_dhcp_edit.php 8 May 2007 18:58:26 -0000 1.18.2.5.2.1
-+++ usr/local/www/services_dhcp_edit.php 8 Sep 2007 18:57:48 -0000
-@@ -147,6 +147,7 @@
-
- $pgtitle = "Services: DHCP: Edit static mapping";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_dhcp_relay.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dhcp_relay.php,v
-retrieving revision 1.8.2.3.2.2
-diff -u -r1.8.2.3.2.2 services_dhcp_relay.php
---- usr/local/www/services_dhcp_relay.php 23 May 2007 21:08:15 -0000 1.8.2.3.2.2
-+++ usr/local/www/services_dhcp_relay.php 8 Sep 2007 18:58:08 -0000
-@@ -141,6 +141,8 @@
-
- $pgtitle = "Services: DHCP Relay";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_dnsmasq.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dnsmasq.php,v
-retrieving revision 1.17.4.4.2.1
-diff -u -r1.17.4.4.2.1 services_dnsmasq.php
---- usr/local/www/services_dnsmasq.php 8 May 2007 22:06:49 -0000 1.17.4.4.2.1
-+++ usr/local/www/services_dnsmasq.php 8 Sep 2007 18:58:55 -0000
-@@ -93,6 +93,8 @@
-
- $pgtitle = "Services: DNS forwarder";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_dnsmasq_domainoverride_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dnsmasq_domainoverride_edit.php,v
-retrieving revision 1.7.4.2
-diff -u -r1.7.4.2 services_dnsmasq_domainoverride_edit.php
---- usr/local/www/services_dnsmasq_domainoverride_edit.php 2 Jan 2006 23:46:24 -0000 1.7.4.2
-+++ usr/local/www/services_dnsmasq_domainoverride_edit.php 8 Sep 2007 18:59:01 -0000
-@@ -96,6 +96,7 @@
-
- $pgtitle = "Services: DNS forwarder: Edit Domain Override";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_dnsmasq_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dnsmasq_edit.php,v
-retrieving revision 1.11.4.2
-diff -u -r1.11.4.2 services_dnsmasq_edit.php
---- usr/local/www/services_dnsmasq_edit.php 2 Jan 2006 23:46:24 -0000 1.11.4.2
-+++ usr/local/www/services_dnsmasq_edit.php 8 Sep 2007 18:59:09 -0000
-@@ -102,6 +102,7 @@
-
- $pgtitle = "Services: DNS forwarder: Edit host";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_dyndns.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_dyndns.php,v
-retrieving revision 1.12.2.9
-diff -u -r1.12.2.9 services_dyndns.php
---- usr/local/www/services_dyndns.php 7 Feb 2007 03:42:33 -0000 1.12.2.9
-+++ usr/local/www/services_dyndns.php 8 Sep 2007 18:59:40 -0000
-@@ -128,6 +128,8 @@
-
- $pgtitle = "Services: Dynamic DNS client";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_proxyarp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_proxyarp.php,v
-retrieving revision 1.16.2.1
-diff -u -r1.16.2.1 services_proxyarp.php
---- usr/local/www/services_proxyarp.php 2 Jan 2006 23:46:24 -0000 1.16.2.1
-+++ usr/local/www/services_proxyarp.php 8 Sep 2007 18:59:47 -0000
-@@ -66,6 +66,7 @@
-
- $pgtitle = "Services: Proxy ARP";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_proxyarp_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_proxyarp_edit.php,v
-retrieving revision 1.13.4.2
-diff -u -r1.13.4.2 services_proxyarp_edit.php
---- usr/local/www/services_proxyarp_edit.php 2 Jan 2006 23:46:24 -0000 1.13.4.2
-+++ usr/local/www/services_proxyarp_edit.php 8 Sep 2007 19:00:15 -0000
-@@ -133,6 +133,8 @@
-
- $pgtitle = "Services: Proxy ARP: Edit";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_snmp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_snmp.php,v
-retrieving revision 1.9.4.12
-diff -u -r1.9.4.12 services_snmp.php
---- usr/local/www/services_snmp.php 4 Mar 2007 21:18:17 -0000 1.9.4.12
-+++ usr/local/www/services_snmp.php 8 Sep 2007 19:00:58 -0000
-@@ -145,6 +145,8 @@
-
- $pgtitle = "Services: SNMP";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
- <script language="JavaScript">
-Index: usr/local/www/services_usermanager.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_usermanager.php,v
-retrieving revision 1.10.4.1
-diff -u -r1.10.4.1 services_usermanager.php
---- usr/local/www/services_usermanager.php 2 Jan 2006 23:46:24 -0000 1.10.4.1
-+++ usr/local/www/services_usermanager.php 8 Sep 2007 19:01:11 -0000
-@@ -77,6 +77,7 @@
-
- $pgtitle = "Services: User Manager";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_wol.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_wol.php,v
-retrieving revision 1.12.2.2.2.1
-diff -u -r1.12.2.2.2.1 services_wol.php
---- usr/local/www/services_wol.php 8 May 2007 22:06:49 -0000 1.12.2.2.2.1
-+++ usr/local/www/services_wol.php 8 Sep 2007 19:01:15 -0000
-@@ -92,6 +92,7 @@
-
- $pgtitle = "Services: Wake on LAN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/services_wol_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/services_wol_edit.php,v
-retrieving revision 1.11.2.2
-diff -u -r1.11.2.2 services_wol_edit.php
---- usr/local/www/services_wol_edit.php 2 Jan 2006 23:46:24 -0000 1.11.2.2
-+++ usr/local/www/services_wol_edit.php 8 Sep 2007 19:01:21 -0000
-@@ -91,6 +91,7 @@
-
- $pgtitle = "Services: Wake on LAN: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/status.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status.php,v
-retrieving revision 1.24.2.9
-diff -u -r1.24.2.9 status.php
---- usr/local/www/status.php 27 Mar 2007 20:34:35 -0000 1.24.2.9
-+++ usr/local/www/status.php 8 Sep 2007 19:02:02 -0000
-@@ -160,6 +160,8 @@
-
- $pgtitle = "pfSense: status";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
- <style type="text/css">
-@@ -172,6 +174,7 @@
- }
- -->
- </style>
-+</head>
-
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/status_captiveportal.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_captiveportal.php,v
-retrieving revision 1.7.2.4
-diff -u -r1.7.2.4 status_captiveportal.php
---- usr/local/www/status_captiveportal.php 3 Apr 2006 21:05:12 -0000 1.7.2.4
-+++ usr/local/www/status_captiveportal.php 8 Sep 2007 19:02:17 -0000
-@@ -36,6 +36,7 @@
- $pgtitle = "Status: Captive portal ({$concurrent})";
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/status_filter_reload.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_filter_reload.php,v
-retrieving revision 1.1.2.8
-diff -u -r1.1.2.8 status_filter_reload.php
---- usr/local/www/status_filter_reload.php 5 Apr 2006 02:01:18 -0000 1.1.2.8
-+++ usr/local/www/status_filter_reload.php 8 Sep 2007 19:02:22 -0000
-@@ -33,6 +33,7 @@
- $pgtitle = "Diagnostics: Filter Reload Status";
-
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- if(file_exists("{$g['varrun_path']}/filter_reload_status"))
- $status = file_get_contents("{$g['varrun_path']}/filter_reload_status");
-Index: usr/local/www/status_graph.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_graph.php,v
-retrieving revision 1.14.2.5.2.2
-diff -u -r1.14.2.5.2.2 status_graph.php
---- usr/local/www/status_graph.php 24 Apr 2007 21:25:11 -0000 1.14.2.5.2.2
-+++ usr/local/www/status_graph.php 8 Sep 2007 19:02:27 -0000
-@@ -54,6 +54,7 @@
-
- $pgtitle = "Status: Traffic Graph";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/status_interfaces.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_interfaces.php,v
-retrieving revision 1.29.2.13.2.3
-diff -u -r1.29.2.13.2.3 status_interfaces.php
---- usr/local/www/status_interfaces.php 30 May 2007 16:11:26 -0000 1.29.2.13.2.3
-+++ usr/local/www/status_interfaces.php 8 Sep 2007 19:02:33 -0000
-@@ -61,6 +61,7 @@
-
- $pgtitle = "Status: Interfaces";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/status_queues.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_queues.php,v
-retrieving revision 1.25.2.10
-diff -u -r1.25.2.10 status_queues.php
---- usr/local/www/status_queues.php 24 Apr 2006 22:02:15 -0000 1.25.2.10
-+++ usr/local/www/status_queues.php 8 Sep 2007 19:02:40 -0000
-@@ -53,6 +53,7 @@
-
- $pgtitle = "Status: Traffic shaper: Queues";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/status_rrd_graph.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_rrd_graph.php,v
-retrieving revision 1.7.2.31.2.1
-diff -u -r1.7.2.31.2.1 status_rrd_graph.php
---- usr/local/www/status_rrd_graph.php 6 Jul 2007 21:43:43 -0000 1.7.2.31.2.1
-+++ usr/local/www/status_rrd_graph.php 8 Sep 2007 19:03:22 -0000
-@@ -78,10 +78,13 @@
-
- $pgtitle = gettext("Status: RRD Graphs");
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
- <script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script>
- <script src="/javascript/scriptaculous/scriptaculous.js" type="text/javascript"></script>
-+</head>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
- <p class="pgtitle"><?=$pgtitle?></p>
-Index: usr/local/www/status_services.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_services.php,v
-retrieving revision 1.40.2.19.2.4
-diff -u -r1.40.2.19.2.4 status_services.php
---- usr/local/www/status_services.php 2 Jun 2007 20:47:41 -0000 1.40.2.19.2.4
-+++ usr/local/www/status_services.php 8 Sep 2007 19:03:38 -0000
-@@ -142,6 +142,7 @@
-
- $pgtitle = "Status: Services";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/status_slbd_pool.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_slbd_pool.php,v
-retrieving revision 1.3.2.4.2.1
-diff -u -r1.3.2.4.2.1 status_slbd_pool.php
---- usr/local/www/status_slbd_pool.php 28 Apr 2007 16:46:56 -0000 1.3.2.4.2.1
-+++ usr/local/www/status_slbd_pool.php 8 Sep 2007 19:03:44 -0000
-@@ -47,6 +47,7 @@
-
- $pgtitle = "Status: Load Balancer: Pool";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/status_slbd_vs.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_slbd_vs.php,v
-retrieving revision 1.2.2.2
-diff -u -r1.2.2.2 status_slbd_vs.php
---- usr/local/www/status_slbd_vs.php 8 May 2007 16:29:17 -0000 1.2.2.2
-+++ usr/local/www/status_slbd_vs.php 8 Sep 2007 19:03:50 -0000
-@@ -51,6 +51,7 @@
-
- $pgtitle = "Status: Load Balancer: Virtual Server";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/status_upnp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_upnp.php,v
-retrieving revision 1.1.2.3.2.1
-diff -u -r1.1.2.3.2.1 status_upnp.php
---- usr/local/www/status_upnp.php 23 May 2007 20:26:19 -0000 1.1.2.3.2.1
-+++ usr/local/www/status_upnp.php 8 Sep 2007 19:04:09 -0000
-@@ -49,7 +49,7 @@
- /* put your custom HTML head content here */
- /* using some of the $pfSenseHead function calls */
- //$pfSenseHead->addMeta("<meta http-equiv=\"refresh\" content=\"120;url={$_SERVER['SCRIPT_NAME']}\" />");
--//echo $pfSenseHead->getHTML();
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/status_wireless.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/status_wireless.php,v
-retrieving revision 1.9.2.9
-diff -u -r1.9.2.9 status_wireless.php
---- usr/local/www/status_wireless.php 5 May 2006 21:31:47 -0000 1.9.2.9
-+++ usr/local/www/status_wireless.php 8 Sep 2007 19:04:16 -0000
-@@ -36,6 +36,7 @@
-
- $pgtitle = "Diagnostics: Wireless Status";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- $if = $_POST['if'];
- if($_GET['if'] <> "")
-Index: usr/local/www/system.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system.php,v
-retrieving revision 1.41.2.7.2.1
-diff -u -r1.41.2.7.2.1 system.php
---- usr/local/www/system.php 6 Jul 2007 18:30:31 -0000 1.41.2.7.2.1
-+++ usr/local/www/system.php 8 Sep 2007 19:04:21 -0000
-@@ -190,6 +190,7 @@
-
- $pgtitle = "System: General Setup";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/system_advanced.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_advanced.php,v
-retrieving revision 1.114.2.46.2.4
-diff -u -r1.114.2.46.2.4 system_advanced.php
---- usr/local/www/system_advanced.php 21 Jul 2007 21:22:18 -0000 1.114.2.46.2.4
-+++ usr/local/www/system_advanced.php 8 Sep 2007 19:04:26 -0000
-@@ -266,6 +266,7 @@
-
- $pgtitle = "System: Advanced functions";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/system_advanced_create_certs.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_advanced_create_certs.php,v
-retrieving revision 1.14.4.4
-diff -u -r1.14.4.4 system_advanced_create_certs.php
---- usr/local/www/system_advanced_create_certs.php 19 Jan 2006 05:58:23 -0000 1.14.4.4
-+++ usr/local/www/system_advanced_create_certs.php 8 Sep 2007 19:04:32 -0000
-@@ -140,6 +140,7 @@
-
- $pgtitle = "System: Advanced functions: Create Certificates";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/system_firmware.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_firmware.php,v
-retrieving revision 1.73.2.12
-diff -u -r1.73.2.12 system_firmware.php
---- usr/local/www/system_firmware.php 14 Mar 2007 19:22:10 -0000 1.73.2.12
-+++ usr/local/www/system_firmware.php 8 Sep 2007 19:04:47 -0000
-@@ -37,6 +37,7 @@
- if(file_exists($d_firmwarelock_path)) {
- $pgtitle = "System: Firmware: Manual Update";
- include("head.inc");
-+ echo $pfSenseHead->getHTML();
- echo "<body link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";
- include("fbegin.inc");
- echo "<p class=\"pgtitle\"><?=$pgtitle?></p>\n";
-@@ -124,6 +125,7 @@
-
- $pgtitle = "System: Firmware: Manual Update";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/system_firmware_auto.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_firmware_auto.php,v
-retrieving revision 1.52.4.2
-diff -u -r1.52.4.2 system_firmware_auto.php
---- usr/local/www/system_firmware_auto.php 15 Apr 2006 16:50:47 -0000 1.52.4.2
-+++ usr/local/www/system_firmware_auto.php 8 Sep 2007 19:05:05 -0000
-@@ -41,6 +41,7 @@
-
- $pgtitle = "System: Firmware: Auto Update";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/system_firmware_check.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_firmware_check.php,v
-retrieving revision 1.38.4.3
-diff -u -r1.38.4.3 system_firmware_check.php
---- usr/local/www/system_firmware_check.php 15 Apr 2006 16:50:47 -0000 1.38.4.3
-+++ usr/local/www/system_firmware_check.php 8 Sep 2007 19:05:21 -0000
-@@ -39,6 +39,7 @@
- $versions = check_firmware_version();
- $pgtitle = "System: Firmware: Auto Update";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/system_firmware_settings.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_firmware_settings.php,v
-retrieving revision 1.15.2.4
-diff -u -r1.15.2.4 system_firmware_settings.php
---- usr/local/www/system_firmware_settings.php 15 Apr 2006 16:50:47 -0000 1.15.2.4
-+++ usr/local/www/system_firmware_settings.php 8 Sep 2007 19:06:04 -0000
-@@ -57,6 +57,8 @@
-
- $pgtitle = "System: Firmware: Settings";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-@@ -88,7 +90,7 @@
-
- // -->
- </script>
--
-+</head>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc");?>
- <p class="pgtitle"><?=$pgtitle?></p>
-Index: usr/local/www/system_routes.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_routes.php,v
-retrieving revision 1.16.2.4.2.2
-diff -u -r1.16.2.4.2.2 system_routes.php
---- usr/local/www/system_routes.php 10 May 2007 16:06:32 -0000 1.16.2.4.2.2
-+++ usr/local/www/system_routes.php 8 Sep 2007 19:06:11 -0000
-@@ -89,6 +89,7 @@
-
- $pgtitle = "System: Static Routes";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/system_routes_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/system_routes_edit.php,v
-retrieving revision 1.9.4.4.2.1
-diff -u -r1.9.4.4.2.1 system_routes_edit.php
---- usr/local/www/system_routes_edit.php 10 May 2007 16:06:32 -0000 1.9.4.4.2.1
-+++ usr/local/www/system_routes_edit.php 8 Sep 2007 19:06:16 -0000
-@@ -112,6 +112,7 @@
-
- $pgtitle = "System: Static Routes: Edit route";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec.php,v
-retrieving revision 1.28.2.10.2.5
-diff -u -r1.28.2.10.2.5 vpn_ipsec.php
---- usr/local/www/vpn_ipsec.php 5 Jun 2007 00:23:07 -0000 1.28.2.10.2.5
-+++ usr/local/www/vpn_ipsec.php 8 Sep 2007 19:06:38 -0000
-@@ -84,6 +84,7 @@
-
- $pgtitle = "VPN: IPsec";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec_ca.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_ca.php,v
-retrieving revision 1.12.4.2
-diff -u -r1.12.4.2 vpn_ipsec_ca.php
---- usr/local/www/vpn_ipsec_ca.php 18 Mar 2007 03:37:06 -0000 1.12.4.2
-+++ usr/local/www/vpn_ipsec_ca.php 8 Sep 2007 19:06:42 -0000
-@@ -48,6 +48,7 @@
-
- $pgtitle = "VPN: IPsec: Certificate Authority";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec_ca_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_ca_edit.php,v
-retrieving revision 1.12.4.2
-diff -u -r1.12.4.2 vpn_ipsec_ca_edit.php
---- usr/local/www/vpn_ipsec_ca_edit.php 2 Jan 2006 23:46:25 -0000 1.12.4.2
-+++ usr/local/www/vpn_ipsec_ca_edit.php 8 Sep 2007 19:06:47 -0000
-@@ -94,6 +94,7 @@
-
- $pgtitle = "VPN: IPsec: Certificate Authority: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec_ca_edit_create_cert.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_ca_edit_create_cert.php,v
-retrieving revision 1.13.4.1
-diff -u -r1.13.4.1 vpn_ipsec_ca_edit_create_cert.php
---- usr/local/www/vpn_ipsec_ca_edit_create_cert.php 2 Jan 2006 23:46:25 -0000 1.13.4.1
-+++ usr/local/www/vpn_ipsec_ca_edit_create_cert.php 8 Sep 2007 19:06:53 -0000
-@@ -143,6 +143,7 @@
-
- $pgtitle = "VPN: IPSec: Certificate Authority: Create Certificate";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_ipsec_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_edit.php,v
-retrieving revision 1.29.2.13.2.1
-diff -u -r1.29.2.13.2.1 vpn_ipsec_edit.php
---- usr/local/www/vpn_ipsec_edit.php 8 May 2007 22:06:49 -0000 1.29.2.13.2.1
-+++ usr/local/www/vpn_ipsec_edit.php 8 Sep 2007 19:06:58 -0000
-@@ -263,6 +263,7 @@
-
- $pgtitle = "VPN: IPsec: Edit tunnel";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec_keys.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_keys.php,v
-retrieving revision 1.15.4.2.2.1
-diff -u -r1.15.4.2.2.1 vpn_ipsec_keys.php
---- usr/local/www/vpn_ipsec_keys.php 8 May 2007 22:06:49 -0000 1.15.4.2.2.1
-+++ usr/local/www/vpn_ipsec_keys.php 8 Sep 2007 19:07:03 -0000
-@@ -48,6 +48,7 @@
-
- $pgtitle = "VPN: IPsec: Keys";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec_keys_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_keys_edit.php,v
-retrieving revision 1.11.4.2
-diff -u -r1.11.4.2 vpn_ipsec_keys_edit.php
---- usr/local/www/vpn_ipsec_keys_edit.php 2 Jan 2006 23:46:25 -0000 1.11.4.2
-+++ usr/local/www/vpn_ipsec_keys_edit.php 8 Sep 2007 19:07:07 -0000
-@@ -92,6 +92,7 @@
-
- $pgtitle = "VPN: IPsec: Edit pre-shared key";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_ipsec_mobile.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_ipsec_mobile.php,v
-retrieving revision 1.12.4.2
-diff -u -r1.12.4.2 vpn_ipsec_mobile.php
---- usr/local/www/vpn_ipsec_mobile.php 18 Mar 2007 03:37:06 -0000 1.12.4.2
-+++ usr/local/www/vpn_ipsec_mobile.php 8 Sep 2007 19:07:11 -0000
-@@ -162,6 +162,7 @@
-
- $pgtitle = "VPN: IPsec: Mobile";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_openvpn.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn.php,v
-retrieving revision 1.13.2.2
-diff -u -r1.13.2.2 vpn_openvpn.php
---- usr/local/www/vpn_openvpn.php 30 Jan 2006 02:25:12 -0000 1.13.2.2
-+++ usr/local/www/vpn_openvpn.php 8 Sep 2007 19:07:16 -0000
-@@ -144,6 +144,7 @@
-
- $pgtitle = "VPN: OpenVPN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_openvpn_ccd.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_ccd.php,v
-retrieving revision 1.1.2.2
-diff -u -r1.1.2.2 vpn_openvpn_ccd.php
---- usr/local/www/vpn_openvpn_ccd.php 30 Jan 2006 02:25:12 -0000 1.1.2.2
-+++ usr/local/www/vpn_openvpn_ccd.php 8 Sep 2007 19:07:20 -0000
-@@ -95,6 +95,7 @@
-
- $pgtitle = "VPN: OpenVPN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/vpn_openvpn_ccd_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_ccd_edit.php,v
-retrieving revision 1.1.2.2
-diff -u -r1.1.2.2 vpn_openvpn_ccd_edit.php
---- usr/local/www/vpn_openvpn_ccd_edit.php 30 Jan 2006 02:25:12 -0000 1.1.2.2
-+++ usr/local/www/vpn_openvpn_ccd_edit.php 8 Sep 2007 19:07:26 -0000
-@@ -209,6 +209,7 @@
-
- $pgtitle = "VPN: OpenVPN: Edit client-specific configuration";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_openvpn_cli.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_cli.php,v
-retrieving revision 1.16.2.3
-diff -u -r1.16.2.3 vpn_openvpn_cli.php
---- usr/local/www/vpn_openvpn_cli.php 30 Jan 2006 02:25:12 -0000 1.16.2.3
-+++ usr/local/www/vpn_openvpn_cli.php 8 Sep 2007 19:07:31 -0000
-@@ -83,6 +83,7 @@
-
- $pgtitle = "VPN: OpenVPN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/vpn_openvpn_cli_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_cli_edit.php,v
-retrieving revision 1.15.2.3
-diff -u -r1.15.2.3 vpn_openvpn_cli_edit.php
---- usr/local/www/vpn_openvpn_cli_edit.php 30 Jan 2006 02:25:12 -0000 1.15.2.3
-+++ usr/local/www/vpn_openvpn_cli_edit.php 8 Sep 2007 19:07:36 -0000
-@@ -285,6 +285,7 @@
-
- $pgtitle = "VPN: OpenVPN: Edit client";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_openvpn_create_certs.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_openvpn_create_certs.php,v
-retrieving revision 1.14.4.2
-diff -u -r1.14.4.2 vpn_openvpn_create_certs.php
---- usr/local/www/vpn_openvpn_create_certs.php 7 Apr 2006 21:36:51 -0000 1.14.4.2
-+++ usr/local/www/vpn_openvpn_create_certs.php 8 Sep 2007 19:07:57 -0000
-@@ -151,6 +151,8 @@
-
- $pgtitle = "VPN: OpenVPN: Create Certs";
- include("head.inc");
-+$pfSenseHead->setCloseHead(false);
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_openvpn_crl.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_crl.php,v
-retrieving revision 1.1.2.2
-diff -u -r1.1.2.2 vpn_openvpn_crl.php
---- usr/local/www/vpn_openvpn_crl.php 30 Jan 2006 02:25:12 -0000 1.1.2.2
-+++ usr/local/www/vpn_openvpn_crl.php 8 Sep 2007 19:08:02 -0000
-@@ -76,6 +76,7 @@
-
- $pgtitle = "VPN: OpenVPN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/vpn_openvpn_crl_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_crl_edit.php,v
-retrieving revision 1.1.2.2
-diff -u -r1.1.2.2 vpn_openvpn_crl_edit.php
---- usr/local/www/vpn_openvpn_crl_edit.php 30 Jan 2006 02:25:12 -0000 1.1.2.2
-+++ usr/local/www/vpn_openvpn_crl_edit.php 8 Sep 2007 19:08:07 -0000
-@@ -152,6 +152,7 @@
-
- $pgtitle = "VPN: OpenVPN: Edit CRL";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_openvpn_srv.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_srv.php,v
-retrieving revision 1.1.2.3
-diff -u -r1.1.2.3 vpn_openvpn_srv.php
---- usr/local/www/vpn_openvpn_srv.php 30 Jan 2006 02:25:12 -0000 1.1.2.3
-+++ usr/local/www/vpn_openvpn_srv.php 8 Sep 2007 19:08:11 -0000
-@@ -84,6 +84,7 @@
-
- $pgtitle = "VPN: OpenVPN";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <?php include("fbegin.inc"); ?>
-Index: usr/local/www/vpn_openvpn_srv_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/Attic/vpn_openvpn_srv_edit.php,v
-retrieving revision 1.1.2.3
-diff -u -r1.1.2.3 vpn_openvpn_srv_edit.php
---- usr/local/www/vpn_openvpn_srv_edit.php 30 Jan 2006 02:25:12 -0000 1.1.2.3
-+++ usr/local/www/vpn_openvpn_srv_edit.php 8 Sep 2007 19:08:16 -0000
-@@ -513,6 +513,7 @@
-
- $pgtitle = "VPN: OpenVPN: Edit server";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_pppoe.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_pppoe.php,v
-retrieving revision 1.14.2.8.2.1
-diff -u -r1.14.2.8.2.1 vpn_pppoe.php
---- usr/local/www/vpn_pppoe.php 27 Apr 2007 20:19:26 -0000 1.14.2.8.2.1
-+++ usr/local/www/vpn_pppoe.php 8 Sep 2007 19:08:22 -0000
-@@ -139,6 +139,7 @@
-
- $pgtitle = "VPN: PPPoE";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_pppoe_users.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_pppoe_users.php,v
-retrieving revision 1.5.2.4.2.1
-diff -u -r1.5.2.4.2.1 vpn_pppoe_users.php
---- usr/local/www/vpn_pppoe_users.php 8 May 2007 22:06:49 -0000 1.5.2.4.2.1
-+++ usr/local/www/vpn_pppoe_users.php 8 Sep 2007 19:08:26 -0000
-@@ -67,6 +67,7 @@
-
- $pgtitle = "VPN: PPPoE: Users";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_pppoe_users_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_pppoe_users_edit.php,v
-retrieving revision 1.3.2.3
-diff -u -r1.3.2.3 vpn_pppoe_users_edit.php
---- usr/local/www/vpn_pppoe_users_edit.php 11 Mar 2006 20:35:47 -0000 1.3.2.3
-+++ usr/local/www/vpn_pppoe_users_edit.php 8 Sep 2007 19:08:32 -0000
-@@ -113,6 +113,7 @@
-
- $pgtitle = "VPN: PPPoE: User: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/vpn_pptp.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_pptp.php,v
-retrieving revision 1.21.2.5
-diff -u -r1.21.2.5 vpn_pptp.php
---- usr/local/www/vpn_pptp.php 5 May 2006 02:15:20 -0000 1.21.2.5
-+++ usr/local/www/vpn_pptp.php 8 Sep 2007 19:08:36 -0000
-@@ -148,6 +148,7 @@
-
- $pgtitle = "VPN PPTP";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_pptp_users.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_pptp_users.php,v
-retrieving revision 1.16.2.3.2.1
-diff -u -r1.16.2.3.2.1 vpn_pptp_users.php
---- usr/local/www/vpn_pptp_users.php 8 May 2007 22:06:49 -0000 1.16.2.3.2.1
-+++ usr/local/www/vpn_pptp_users.php 8 Sep 2007 19:08:42 -0000
-@@ -65,6 +65,7 @@
-
- $pgtitle = "VPN: PPTP: Users";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
-
-Index: usr/local/www/vpn_pptp_users_edit.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/vpn_pptp_users_edit.php,v
-retrieving revision 1.12.4.3
-diff -u -r1.12.4.3 vpn_pptp_users_edit.php
---- usr/local/www/vpn_pptp_users_edit.php 19 Jan 2007 16:39:07 -0000 1.12.4.3
-+++ usr/local/www/vpn_pptp_users_edit.php 8 Sep 2007 19:08:47 -0000
-@@ -110,6 +110,7 @@
-
- $pgtitle = "VPN: PPTP: User: Edit";
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-Index: usr/local/www/wizard.php
-===================================================================
-RCS file: /cvsroot/pfSense/usr/local/www/wizard.php,v
-retrieving revision 1.46.2.15
-diff -u -r1.46.2.15 wizard.php
---- usr/local/www/wizard.php 6 Feb 2007 19:33:01 -0000 1.46.2.15
-+++ usr/local/www/wizard.php 8 Sep 2007 19:08:58 -0000
-@@ -148,6 +148,7 @@
-
- $pgtitle = $title;
- include("head.inc");
-+echo $pfSenseHead->getHTML();
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC" onLoad="enablechange();">
diff --git a/config/authng/doc/images/pfSense-AuthMethods.png b/config/authng/doc/images/pfSense-AuthMethods.png
deleted file mode 100644
index afd62083..00000000
--- a/config/authng/doc/images/pfSense-AuthMethods.png
+++ /dev/null
Binary files differ
diff --git a/config/authng/doc/images/pfSense-Backends.png b/config/authng/doc/images/pfSense-Backends.png
deleted file mode 100644
index 9086f5d4..00000000
--- a/config/authng/doc/images/pfSense-Backends.png
+++ /dev/null
Binary files differ
diff --git a/config/authng/doc/images/pfSense-Peers.png b/config/authng/doc/images/pfSense-Peers.png
deleted file mode 100644
index b1ca8ea7..00000000
--- a/config/authng/doc/images/pfSense-Peers.png
+++ /dev/null
Binary files differ
diff --git a/config/authng/pkg/authng.inc b/config/authng/pkg/authng.inc
deleted file mode 100644
index 06774acd..00000000
--- a/config/authng/pkg/authng.inc
+++ /dev/null
@@ -1,323 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-/* PHP classes like factories users, and groups */
-require_once("authng_classdefs.inc");
-/* PHP classes representing specific auth methods */
-require_once("authng_authmethods.inc");
-/* PHP classes representing specific backends */
-require_once("authng_backends.inc");
-/* PHP peer classes that are providing a persistence layer */
-require_once("authng_peers.inc");
-
-// TODO: Define user- and groupindex array
-
-// get principal store type from config.xml
-// TODO: needs to be defined in config.xml
-//$principalStore = $config['system']['webgui']['principal_store'];
-$principalStore = "xml";
-// get PeerFactory instance
-$peerFactory =& PeerFactory::getInstance();
-// get the actual UserPeer that holds the user index
-$userPeer =& $peerFactory->getUserPeerByPrincipalStore($principalStore);
-// get the actual GroupPeer that holds the user index
-$groupPeer =& $peerFactory->getGroupPeerByPrincipalStore($principalStore);
-// get AuthMethodFactory instance
-$authMethodFactory =& AuthMethodFactory::getInstance();
-// get BackendFactory instance
-$backendFactory =& BackendFactory::getInstance();
-// get the actual auth method
-$authMethod =& $authMethodFactory->getAuthMethodByName($config['system']['webgui']['auth_method']);
-// get the actual backend
-$backend =& $backendFactory->getBackendByName($config['system']['webgui']['backing_method']);
-
-function getUsermanagerPagetitle() {
- global $userPeer;
-
- $result = "";
-
- if ($userPeer->isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) {
- // Page title for admins
- $result = array(gettext("System"), gettext("User manager"));
- } else {
- // Page title for non-admins
- $result = array(gettext("System"), gettext("User password"));
- }
-
- return $result;
-}
-
-function processUserManagerPostVars() {
- global $input_errors, $savemsg, $config;
-
- if (isset($_POST['save'])) {
- unset($input_errors);
-
- /* input validation */
- $reqdfields = explode(" ", "passwordfld1");
- $reqdfieldsn = explode(",", "Password");
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- if ($_POST['passwordfld1'] != $_POST['passwordfld2'])
- $input_errors[] = "The passwords do not match.";
-
- if (!$input_errors) {
- // all values are okay --> saving changes
- $config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['password'] = crypt(trim($_POST['passwordfld1']));
-
- write_config();
-
- sync_webgui_passwords();
-
- $retval = system_password_configure();
- $savemsg = get_std_save_message($retval);
- $savemsg = "Password successfully changed<br />";
- }
- }
-}
-
-function processUserManagerAdminPostVars() {
- global $config;
-
- $id = $_GET['id'];
- if (isset($_POST['id']))
- $id = $_POST['id'];
-
- if (!is_array($config['system']['user'])) {
- $config['system']['user'] = array();
- }
-
- admin_users_sort();
- $a_user = &$config['system']['user'];
- $t_privs = $a_user[$id]['priv'];
-
- if ($_GET['act'] == "del" && $_GET['what'] == "user") {
- if ($a_user[$_GET['id']]) {
- $userdeleted = $a_user[$_GET['id']]['name'];
- unset($a_user[$_GET['id']]);
- write_config();
- $retval = system_password_configure();
- $savemsg = get_std_save_message($retval);
- $savemsg = gettext("User") . " " . $userdeleted . " " . gettext("successfully deleted") . "<br />";
- }
- } else if ($_GET['act'] == "del" && $_GET['what'] == "priv") {
- if ($t_privs[$_GET['privid']]) {
- $privdeleted = $t_privs[$_GET['privid']]['id'];
- unset($t_privs[$_GET['privid']]);
- write_config();
- $_GET['act'] = "edit";
- $retval = 0;
- $savemsg = get_std_save_message($retval);
- $savemsg = gettext("Privilege") . " " . $privdeleted . " " . gettext("of user") . " " . $a_user[$_GET['id']]['name'] . " " . gettext("successfully deleted") . "<br />";
- }
- }
-
- if ($_POST) {
- unset($input_errors);
- $pconfig = $_POST;
-
- /* input validation */
- if (isset($id) && ($a_user[$id])) {
- $reqdfields = explode(" ", "usernamefld");
- $reqdfieldsn = explode(",", "Username");
- } else {
- $reqdfields = explode(" ", "usernamefld passwordfld1");
- $reqdfieldsn = explode(",", "Username,Password");
- }
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- if (hasShellAccess($_POST['usernamefld'])) {
- if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['usernamefld']))
- $input_errors[] = gettext("The username contains invalid characters.");
- } else {
- if (preg_match("/[^a-zA-Z0-9\@\.\-_]/", $_POST['usernamefld']))
- $input_errors[] = gettext("The username contains invalid characters.");
- }
-
- if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2']))
- $input_errors[] = gettext("The passwords do not match.");
-
- if (!$input_errors && !(isset($id) && $a_user[$id])) {
- /* make sure there are no dupes */
- foreach ($a_user as $userent) {
- if ($userent['name'] == $_POST['usernamefld']) {
- $input_errors[] = gettext("Another entry with the same username already exists.");
- break;
- }
- }
- }
-
- if ($pconfig['utype'] <> "system" && !isset($groupindex[$_POST['groupname']])) {
- $input_errors[] = gettext("group does not exist, please define the group before assigning users.");
- }
-
- if (isset($config['system']['ssh']['sshdkeyonly']) &&
- empty($_POST['authorizedkeys'])) {
- $input_errors[] = gettext("You must provide an authorized key otherwise you won't be able to login into this system.");
- }
-
- /* if this is an AJAX caller then handle via JSON */
- if (isAjax() && is_array($input_errors)) {
- input_errors2Ajax($input_errors);
- exit;
- }
-
- if (!$input_errors) {
- if (isset($id) && $a_user[$id])
- $userent = $a_user[$id];
-
- /* the user did change his username */
- if ($_POST['usernamefld'] <> $_POST['oldusername']) {
- $_SERVER['REMOTE_USER'] = $_POST['usernamefld'];
- }
-
- $userent['name'] = $_POST['usernamefld'];
- $userent['fullname'] = $_POST['fullname'];
- if ($pconfig['utype'] <> "system") {
- $userent['groupname'] = $_POST['groupname'];
- }
- isset($_POST['utype']) ? $userent['scope'] = $_POST['utype'] : $userent['scope'] = "system";
-
- if ($_POST['passwordfld1'])
- $userent['password'] = crypt($_POST['passwordfld1']);
-
- if(isset($config['system']['ssh']['sshdkeyonly'])) {
- $userent['authorizedkeys'] = base64_encode($_POST['authorizedkeys']);
- }
-
- if (isset($id) && $a_user[$id])
- $a_user[$id] = $userent;
- else
- $a_user[] = $userent;
-
- write_config();
- $retval = system_password_configure();
- sync_webgui_passwords();
-
- pfSenseHeader("system_usermanager.php");
- }
- }
-}
-
-/**
- * getWindowJSScriptRefs()
- *
- * @return
- */
-function getWindowJSScriptRefs(){
- $result = array('<script type="text/javascript" src="/javascript/windows-js/javascript/window.js"></script>',
- '<script type="text/javascript" src="/javascript/windows-js/javascript/window_effects.js"></script>',
- '<script type="text/javascript" src="/javascript/windows-js/javascript/debug.js"></script>');
-
- return $result;
-}
-
-function gotNoUsers() {
- global $config;
- return empty($config['installedpackages']['authng']['config']);
-}
-
-/**
- * openNoUserDefsDialog()
- *
- * @param mixed $effectClass
- * @return
- */
-function openNoUserDefsDialog($effectClass) {
- if (gotNoUsers()) {
- $alertMessage = gettext("No users or groups found. You will be forwarded to the AuthNG wizard to be able to define users and groups.");
- $dialogScript = "
- <script type='text/javascript'>
- var anchor = document.getElementById('popupanchor');
-
- function forwardToWizard() {
- window.location.href = '/wizard.php?xml=authng_wizard.xml';
- }
-
- function openNoUserDefsDialog(html) {
- var effect = new PopupEffect(html, {className: '${effectClass}'});
- Dialog.alert('${alertMessage}',{className:'alphacube', top:150, width:400, height:null, showEffect:effect.show.bind(effect), hideEffect:effect.hide.bind(effect), onOk:forwardToWizard});
- }
-
- openNoUserDefsDialog(anchor);
- </script>
- ";
-
- return $dialogScript;
- }
-}
-
-/**
- * getWindowJSStyleRefs()
- *
- * @return
- */
-function getWindowJSStyleRefs(){
- $result = array('<link href="/javascript/windows-js/themes/default.css" rel="stylesheet" type="text/css" />',
- '<link href="/javascript/windows-js/themes/alert.css" rel="stylesheet" type="text/css" />',
- '<link href="/javascript/windows-js/themes/alphacube.css" rel="stylesheet" type="text/css" />');
-
- return $result;
-}
-
-/**
- * installPackageAuthNG()
- *
- * @return
- */
-function installPackageAuthNG() {
- mwexec("cd / && /usr/bin/patch < /usr/local/pkg/authng-pfSenseHead.diff");
- mwexec("cd / && /usr/bin/patch < /usr/local/pkg/authng-fbegin.inc.diff");
- mwexec("cd / && /usr/bin/patch < /usr/local/pkg/authng-guiconfig.inc.diff");
- mwexec("cd / && /usr/bin/patch < /usr/local/pkg/authng-globals.inc.diff");
-}
-
-/**
- * deinstallPackageAuthNG()
- *
- * @return
- */
-function deinstallPackageAuthNG() {
- mwexec("cd / && /usr/bin/patch -R < /usr/local/pkg/authng-pfSenseHead.diff");
- mwexec("cd / && /usr/bin/patch -R < /usr/local/pkg/authng-fbegin.inc.diff");
- mwexec("cd / && /usr/bin/patch -R < /usr/local/pkg/authng-guiconfig.inc.diff");
- mwexec("cd / && /usr/bin/patch -R < /usr/local/pkg/authng-globals.inc.diff");
-}
-?> \ No newline at end of file
diff --git a/config/authng/pkg/authng.xml b/config/authng/pkg/authng.xml
deleted file mode 100644
index cebcea93..00000000
--- a/config/authng/pkg/authng.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE packagegui SYSTEM "../../schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="../../xsl/package.xsl"?>
-<packagegui>
- <copyright>
- <![CDATA[
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
- ]]>
- </copyright>
- <description>
- This package provides a user- and groupmanager which
- allows to add arbitrary groups to the system and assign
- them to a particular group.
-
- Permission control is provided on a per group basis.
- </description>
- <requirements>
- This package is supposed to be run on RELENG based pfSense systems.
- </requirements>
- <faq>Currently there are no FAQ items provided.</faq>
- <name>authng</name>
- <version>1.0</version>
- <title>System: User Manager</title>
- <include_file>/usr/local/pkg/authng.inc</include_file>
- <!-- Menu is where this packages menu will appear -->
- <menu>
- <name>Auth Manager</name>
- <section>System</section>
- <url>/system_usermanager.php</url>
- </menu>
- <!--
- <service>
- <name>yourservice</name>
- <rcfile>/usr/local/etc/rc.d/yourservice.sh</rcfile>
- </service>
- -->
- <tabs />
- <!--
- configpath gets expanded out automatically and config items
- will be stored in that location
- -->
- <configpath>['installedpackages']['authng']['config']</configpath>
- <!--
- |
- | PHP files (user management)
- |
- -->
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/www/php/system_usermanager.php</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/www/php/system_usermanager_edit.php</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/www/php/system_usermanager_settings.php</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/www/php/system_groupmanager.php</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/www/php/head.inc</item>
- </additional_files_needed>
- <!--
- |
- | Include files (class defs etc.)
- |
- -->
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/pkg/authng_classdefs.inc</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/pkg/authng_peers.inc</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/pkg/authng.inc</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/pkg/authng_backends.inc</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/pkg/authng_authmethods.inc</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/pkg/authng_authgui.inc</item>
- </additional_files_needed>
- <!--
- |
- | Patch files
- |
- -->
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/diff/authng-pfSenseHead.diff</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/diff/authng-fbegin.inc.diff</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/diff/authng-globals.inc.diff</item>
- </additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/diff/authng-guiconfig.inc.diff</item>
- </additional_files_needed>
- <!--
- |
- | Binary files
- |
- -->
- <additional_files_needed>
- <prefix>/usr/bin/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/authng/bin/patch</item>
- </additional_files_needed>
- <!--
- fields gets invoked when the user adds or edits a item. The following items
- will be parsed and rendered for the user as a gui with input, and selectboxes.
- -->
- <!--
- Arbitrary PHP Code, that gets executed if a certain event gets triggered.
- -->
- <custom_php_resync_config_command>
- syncPackageAuthNG();
- </custom_php_resync_config_command>
- <custom_php_install_command>
- installPackageAuthNG();
- </custom_php_install_command>
- <custom_php_deinstall_command>
- deinstallPackageAuthNG();
- </custom_php_deinstall_command>
-</packagegui>
diff --git a/config/authng/pkg/authng_authgui.inc b/config/authng/pkg/authng_authgui.inc
deleted file mode 100644
index 944c9b89..00000000
--- a/config/authng/pkg/authng_authgui.inc
+++ /dev/null
@@ -1,287 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_authgui.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-require_once("authng.inc");
-
-/* Authenticate user - exit if failed (we should have a callback for this maybe) */
-if (empty($authMethod)) { print "auth_method missing!\n"; }
-if (empty($backend)) { print "backing_method missing!\n"; }
-if (!$authMethod->authenticate($backend)) { exit; }
-
-/* scriptname is set in headjs.php if the user did try to access a page other
- * than index.php without beeing logged in.
- */
-if (isset($_POST['scriptname']) && $userPeer->isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) {
- pfSenseHeader("{$_POST['scriptname']}");
- exit;
-}
-
-$allowed = array();
-
-// Once here, the user has authenticated with the web server.
-// Now, we give them access only to the appropriate pages for their group.
-if (!($userPeer->isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER']))) {
- $allowed[] = '';
- if (isset($config['system']['group'][$groupindex[$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['groupname']]]['pages'][0]['page'])) {
- $useridx = $userindex[$HTTP_SERVER_VARS['AUTH_USER']];
- $grouidx = $groupindex[$config['system']['user'][$useridx]];
- $allowed = &$config['system']['group'][$groupidx]['pages'][0]['page'];
- }
-
- $group = $config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['groupname'];
- /* get the group homepage, to be able to forward
- * the user to this particular PHP page.
- */
- $groupPeer->getGroupHomePage($group) == "" ? $home = "/index.php" : $home = "/" . $groupPeer->getGroupHomePage($group);
-
- /* okay but if the user realy tries to explicitely access a particular
- * page, set $home to that page instead.
- */
- if (isset($_POST['scriptname']) && $_POST['scriptname'] <> "/" && $_POST['scriptname'] <> "/index.php")
- $home = basename($_POST['scriptname']);
-
- // If the user is attempting to hit the default page, set it to specifically look for /index.php.
- // Without this, any user would have access to the index page.
- //if ($_SERVER['SCRIPT_NAME'] == '/')
- // $_SERVER['SCRIPT_NAME'] = $home;
-
- // Strip the leading / from the currently requested PHP page
- if (!in_array(basename($_SERVER['SCRIPT_NAME']),$allowed)) {
- // The currently logged in user is not allowed to access the page
- // they are attempting to go to. Redirect them to an allowed page.
-
- if(stristr($_SERVER['SCRIPT_NAME'],"sajax")) {
- echo "||Access to AJAX has been disallowed for this user.";
- exit;
- }
-
- if ($home <> "" && in_array($home, $allowed)) {
- pfSenseHeader("{$home}");
- exit;
- } else {
- header("HTTP/1.0 401 Unauthorized");
- header("Status: 401 Unauthorized");
-
- echo display_error_form("401", "401 Unauthorized. Authorization required.");
- exit;
- }
- }
-
- if (isset($_SESSION['Logged_In'])) {
- /*
- * only forward if the user has just logged in
- * TODO: session auth based - may be an issue.
- */
- if ($_SERVER['SCRIPT_NAME'] <> $home && empty($_SESSION['First_Visit'])) {
- $_SESSION['First_Visit'] = "False";
- pfSenseHeader("{$home}");
- exit;
- }
- }
-}
-
-function display_error_form($http_code, $desc) {
- global $g;
-
- $htmlstr = <<<EOD
-<html>
- <head>
- <script type="text/javascript" src="/javascript/scriptaculous/prototype.js"></script>
- <script type="text/javascript" src="/javascript/scriptaculous/scriptaculous.js"></script>
- <title>An error occurred: {$http_code}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <link rel="shortcut icon" href="/themes/{$g['theme']}/images/icons/favicon.ico" />
- <link rel="stylesheet" type="text/css" href="/themes/{$g['theme']}/all.css" media="all" />
- <style type="text/css">
- #errordesc {
- background: #cccccc;
- border: 0px solid #666666;
- margin: 5em auto;
- padding: 0em;
- width: 340px;
- }
- #errordesc h1 {
- background: url(/themes/{$g['theme']}/images/misc/logon.png) no-repeat top left;
- margin-top: 0;
- display: block;
- text-indent: -1000px;
- height: 50px;
- border-bottom: none;
- }
-
- #login p {
- font-size: 1em;
- font-weight: bold;
- padding: 3px;
- margin: 0em;
- text-indent: 10px;
- }
-
- #login span {
- font-size: 1em;
- font-weight: bold;
- width: 20%;
- padding: 3px;
- margin: 0em;
- text-indent: 10px;
- }
-
- #login p#text {
- font-size: 1em;
- font-weight: normal;
- padding: 3px;
- margin: 0em;
- text-indent: 10px;
- }
- </style>
-
- <script type="text/javascript">
- <!--
- function page_load() {
- NiftyCheck();
- Rounded("div#errordesc","bl br","#333","#cccccc","smooth");
- Effect.Pulsate('errortext', { duration: 10 });
- }
- <?php
- require("headjs.php");
- echo getHeadJS();
- ?>
- //-->
- </script>
- <script type="text/javascript" src="/themes/{$g['theme']}/javascript/niftyjsCode.js"></script>
- </head>
- <body onload="page_load();">
- <div id="errordesc">
- <h1>&nbsp</h1>
- <p id="errortext" style="vertical-align: middle; text-align: center;"><span style="color: #000000; font-weight: bold;">{$desc}</span></p>
- </div>
- </body>
-</html>
-
-EOD;
-
- return $htmlstr;
-}
-
-function display_login_form() {
- require_once("globals.inc");
- global $g;
-
- if(isAjax()) {
- if (isset($_POST['login'])) {
- if($_SESSION['Logged_In'] <> "True") {
- isset($_SESSION['Login_Error']) ? $login_error = $_SESSION['Login_Error'] : $login_error = "unknown reason";
- echo "showajaxmessage('Invalid login ({$login_error}).');";
- }
- if (file_exists("{$g['tmp_path']}/webconfigurator.lock")) {
- $whom = file_get_contents("{$g['tmp_path']}/webconfigurator.lock");
- echo "showajaxmessage('This device is currently beeing maintained by: {$whom}.');";
- }
- }
- exit;
- }
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
- <head>
- <script type="text/javascript" src="/javascript/scriptaculous/prototype.js"></script>
- <script type="text/javascript" src="/javascript/scriptaculous/scriptaculous.js"></script>
- <title><?=gettext("Login"); ?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <link rel="shortcut icon" href="/themes/<?= $g['theme'] ?>/images/icons/favicon.ico" />
- <?php if (file_exists("{$g['www_path']}/themes/{$g['theme']}/login.css")): ?>
- <link rel="stylesheet" type="text/css" href="/themes/<?= $g['theme'] ?>/login.css" media="all" />
- <?php else: ?>
- <link rel="stylesheet" type="text/css" href="/themes/<?= $g['theme'] ?>/all.css" media="all" />
- <?php endif; ?>
- <script type="text/javascript">
- <!--
- <?php if (file_exists("{$g['www_path']}/themes/{$g['theme']}/login.css")): ?>
- var dontUseCustomBGColor = false;
- <?php else: ?>
- var dontUseCustomBGColor = true;
- <?php endif; ?>
- function page_load() {
- NiftyCheck();
- Rounded("div#login","bl br","#333","#cccccc","smooth");
- document.login_iform.usernamefld.focus();
- }
- function clearError() {
- if($('inputerrors'))
- $('inputerrors').innerHTML='';
- }
- <?php
-// require("headjs.php");
-// echo getHeadJS();
- ?>
- //-->
- </script>
- <script type="text/javascript" src="/themes/<?= $g['theme'] ?>/javascript/niftyjsCode.js"></script>
- </head>
- <body onload="page_load()">
- <div id="login">
- <h1>&nbsp;</h1>
- <form id="iform" name="login_iform" method="post" autocomplete="off" action="<?= $_SERVER['SCRIPT_NAME'] ?>">
- <div id="inputerrors"></div>
- <p>
- <span style="text-align: left;">
- <?=gettext("Username"); ?>:&nbsp;&nbsp;
- </span>
- <input onclick="clearError();" onchange="clearError();" id="usernamefld" type="text" name="usernamefld" class="formfld user" tabindex="1" />
- </p>
- <p>
- <span style="text-align: left;">
- <?=gettext("Password"); ?>:&nbsp;&nbsp;
- </span>
- <input onclick="clearError();" onchange="clearError();" id="passwordfld" type="password" name="passwordfld" class="formfld pwd" tabindex="2" />
- </p>
- <table width="90%" style="margin-right: auto; margin-left: auto;">
- <tr>
- <td valign="middle" align="right" style="font-style: italic;"><br /><?=gettext("Enter username and password to login."); ?></td>
- <td valign="middle" align="left"><input type="submit" id="submit" name="login" class="formbtn" value="<?=gettext("Login"); ?>" tabindex="3" /></td>
- </tr>
- </table>
- </form>
- </div>
- </body>
-</html>
-<?php
-} // end function
-?> \ No newline at end of file
diff --git a/config/authng/pkg/authng_authmethods.inc b/config/authng/pkg/authng_authmethods.inc
deleted file mode 100644
index 15e15566..00000000
--- a/config/authng/pkg/authng_authmethods.inc
+++ /dev/null
@@ -1,222 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_authmethods.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-class AbstractAuthMethod {
- function authenticate($backend) {
- trigger_error('AbstractAuthMethod::authenticate() needs to be overridden in a subclass.', E_USER_ERROR);
- }
-}
-
-class BasicAuthMethod extends AbstractAuthMethod {
- function authenticate($backend) {
- global $HTTP_SERVER_VARS;
-
- /* Check for AUTH_USER */
- if ($HTTP_SERVER_VARS['PHP_AUTH_USER'] <> "") {
- $HTTP_SERVER_VARS['AUTH_USER'] = $HTTP_SERVER_VARS['PHP_AUTH_USER'];
- $HTTP_SERVER_VARS['AUTH_PW'] = $HTTP_SERVER_VARS['PHP_AUTH_PW'];
- }
- if (!isset($HTTP_SERVER_VARS['AUTH_USER'])) {
- require_once("authng_authgui.inc");
- header("WWW-Authenticate: Basic realm=\".\"");
- header("HTTP/1.0 401 Unauthorized");
- display_error_form("401", gettext("You must enter valid credentials to access this resource."));
- exit;
- } else {
- return $backend($HTTP_SERVER_VARS['AUTH_USER'],$HTTP_SERVER_VARS['AUTH_PW']);
- }
- }
-}
-
-class SessionAuthMethod extends AbstractAuthMethod {
- function authenticate($backend) {
- global $g, $HTTP_SERVER_VARS, $userindex, $config;
-
- session_start();
-
- /* Validate incoming login request */
- if (isset($_POST['login'])) {
- if ($backend($_POST['usernamefld'], $_POST['passwordfld'])) {
- $_SESSION['Logged_In'] = "True";
- $_SESSION['Username'] = $_POST['usernamefld'];
- $_SESSION['last_access'] = time();
- } else {
- $_SESSION['Login_Error'] = "Username or password incorrect.";
- }
- }
-
- /* Show login page if they aren't logged in */
- if (empty($_SESSION['Logged_In'])) {
-
- /* Don't display login forms to AJAX */
- if (isAjax())
- return false;
-
- require_once("authng_authgui.inc");
- display_login_form();
- return false;
- } else {
- /* If session timeout isn't set, we don't mark sessions stale */
- if (!isset($config['system']['webgui']['session_timeout']) or
- $config['system']['webgui']['session_timeout'] == 0 or
- $config['system']['webgui']['session_timeout'] == "")
- $_SESSION['last_access'] = time();
- else
- /* Check for stale session */
- if ($_SESSION['last_access'] < (time() - ($config['system']['webgui']['session_timeout'] * 60)))
- $_GET['logout'] = true;
- else
- /* only update if it wasn't ajax */
- if (!isAjax())
- $_SESSION['last_access'] = time();
-
- /* user hit the logout button */
- if (isset($_GET['logout'])) {
- if (hasLockAbility($_SESSION['Username'])) {
- unlink_if_exists("{$g['tmp_path']}/webconfigurator.lock");
- }
-
- /* wipe out $_SESSION */
- $_SESSION = array();
-
- if (isset($_COOKIE[session_name()])) {
- setcookie(session_name(), '', time()-42000, '/');
- }
-
- /* and destroy it */
- session_destroy();
-
- $scriptName = split("/", $_SERVER["SCRIPT_FILENAME"]);
- $scriptElms = count($scriptName);
- $scriptName = $scriptName[$scriptElms-1];
-
- if (isAjax())
- return false;
-
- /* redirect to page the user is on, it'll prompt them to login again */
- pfSenseHeader($scriptName);
-
- return false;
-
- /* user wants to explicitely delete the log file.
- * Requires a particular privilege.
- */
- } else if ($_GET['deletelock'] && hasLockAbility($_SESSION['Username'])) {
- unlink_if_exists("{$g['tmp_path']}/webconfigurator.lock");
- $HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
- return true;
-
- /* this is for debugging purpose if you do not want to use Ajax
- * to submit a HTML form. It basically disables the observation
- * of the submit event and hence does not trigger Ajax.
- */
- } else if ($_GET['disable_ajax']) {
- $_SESSION['NO_AJAX'] = "True";
- $HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
- return true;
-
- /* Same to re-enable Ajax.
- */
- } else if ($_GET['enable_ajax']) {
- unset($_SESSION['NO_AJAX']);
- $HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
- return true;
-
- /* user wants to explicitely create a lock.
- * Requires a particular privilege.
- */
- } else if ($_GET['createlock'] && hasLockAbility($_SESSION['Username'])) {
- $fd = fopen("{$g['tmp_path']}/webconfigurator.lock", "w");
- fputs($fd, "{$_SERVER['REMOTE_ADDR']} (" .
- getRealName($_SESSION['Username']) . ")");
- fclose($fd);
- /* if the user did delete the lock manually, do not
- * re-create it while the session is valide.
- */
- $_SESSION['Lock_Created'] = "True";
- $HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
- return true;
-
- /* proceed with the login process */
- } else {
- /* if the user is allowed to create a lock,
- * create it once per session.
- */
- if (hasLockAbility($_SESSION['Username']) &&
- ! isset($_SESSION['Lock_Created'])) {
-
- $fd = fopen("{$g['tmp_path']}/webconfigurator.lock", "w");
- fputs($fd, "{$_SERVER['REMOTE_ADDR']} (" .
- getRealName($_SESSION['Username']) . ")");
- fclose($fd);
- /* if the user did delete the lock manually, do not
- * re-create it while the session is valide.
- */
- $_SESSION['Lock_Created'] = "True";
-
- /* give regular users a chance to automatically invalidate
- * a lock if its older than a particular time.
- */
- } else if (! hasLockAbility($_SESSION['Username']) &&
- file_exists("{$g['tmp_path']}/webconfigurator.lock")) {
-
- $offset = 12; //hours
- $mtime = filemtime("{$g['tmp_path']}/webconfigurator.lock");
- $now_minus_offset = mktime(date("H") - $offset, 0, 0, date("m"), date("d"), date("Y"));
-
- if (($mtime - $now_minus_offset) < $mtime) {
- require_once("auth/authgui.inc");
- display_login_form();
- return false;
- } else {
- /* file is older than mtime + offset which may
- * indicate a stale lockfile, hence we are going
- * to remove it.
- */
- unlink_if_exists("{$g['tmp_path']}/webconfigurator.lock");
- }
- }
-
- $HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
- return true;
- } // end if
- } // end if
- } // end function
-}
-
-?> \ No newline at end of file
diff --git a/config/authng/pkg/authng_backends.inc b/config/authng/pkg/authng_backends.inc
deleted file mode 100644
index 1b58e6c1..00000000
--- a/config/authng/pkg/authng_backends.inc
+++ /dev/null
@@ -1,234 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_backends.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-class AbstractBackend {
- function authenticate($username, $passwd) {
- trigger_error('AbstractBackend::authenticate() needs to be overridden in a subclass.', E_USER_ERROR);
- }
-}
-
-class HtpasswdBackend extends AbstractBackend {
- function HtpasswdBackend() {
- }
-
- function authenticate($username, $passd) {
- $authfile = file("/var/run/htpasswd");
-
- /* sanity check to ensure that /usr/local/www/.htpasswd doesn't exist */
- unlink_if_exists("/usr/local/www/.htpasswd");
-
- $matches="";
- if(!($line = array_shift(preg_grep("/^$username:.*$/", $authfile))))
- return false;
-
- /* Get crypted password */
- preg_match("/^$username:((\\$1\\$[.\d\w_\/]{8}\\$)[.\d\w_\/]{22})$/", $line, $matches);
- $pass = $matches[1];
- $salt = $matches[2];
-
- /* Encrypt entered password with salt
- * And finally validate password
- */
- if ($pass == crypt($passwd, $salt))
- return true;
- else
- return false;
- }
-}
-
-class PasswdBackend extends AbstractBackend {
- function PasswdBackend() {
- }
-
- function authenticate($username, $passd) {
- $authfile = file("/etc/master.passwd");
-
- $matches="";
-
- /* Check to see if user even exists */
- if(!($line = array_shift(preg_grep("/^$username:.*$/", $authfile))))
- return false;
-
- /* Get crypted password */
- preg_match("/^$username:((\\$1\\$[.\d\w_\/]{8}\\$)[.\d\w_\/]{22})$/", $line, $matches);
- $pass = $matches[1];
- $salt = $matches[2];
-
- /* Encrypt entered password with salt
- * And finally validate password
- */
- if ($pass == crypt($passwd, $salt))
- return true;
- else
- return false;
- }
-}
-
-class PamBackend extends AbstractBackend {
- function PamBackend() {
- }
-
- function authenticate($username, $passd) {
- /* we do not support blank pwds, don't we? */
- if ($username == "" || passwd == "") { return false; }
-
- if(! extension_loaded( 'pam_auth' )) {
- if(! @dl( 'pam_auth.so' )) {
- return false;
- } else {
- /* no php file no auth, sorry */
- if (! file_exists("/etc/pam.d/php")) {
- if (! file_exists("/etc/pam.d")) { mkdir("/etc/pam.d"); }
-
- $pam_php = <<<EOD
-# /etc/pam.d/php
-#
-# note: both an auth and account entry are required
-
-# auth
-auth required pam_nologin.so no_warn
-auth sufficient pam_opie.so no_warn no_fake_prompts
-auth requisite pam_opieaccess.so no_warn allow_local
-auth required pam_unix.so no_warn try_first_pass
-
-# account
-account required pam_unix.so
-
-# session
-session required pam_permit.so
-
-# password
-password required pam_unix.so no_warn try_first_pass
-
-EOD;
-
- file_put_contents("/etc/pam.d/php", $pam_php);
- } // end if
-
- if (pam_auth($username, $passwd, &$error)) {
- return true;
- } else {
- return false;
- }
- } // end if
- } // end if
- } // end function
-}
-
-class RadiusBackend extends AbstractBackend {
- function RadiusBackend() {
- }
-
- function authenticate($username, $passwd) {
- global $config, $debug;
- $ret = false;
- $radiusservers = $config['system']['radius']['servers'];
-
- $rauth = new Auth_RADIUS_PAP($username, $passwd);
- foreach ($radiusservers as $radsrv) {
- // Add a new server to our instance
- $rauth->addServer($radsrv['ipaddr'], $radsrv['port'], $radsrv['sharedsecret']);
- }
-
- if (!$rauth->start()) {
- $retvalue['auth_val'] = 1;
- $retvalue['error'] = $rauth->getError();
- if ($debug)
- printf("Radius start: %s", $retvalue['error']);
- }
-
- // XXX - billm - somewhere in here we need to handle securid challenge/response
-
- // Send request
- $result = $rauth->send();
-
- if (PEAR::isError($result)) {
- $retvalue['auth_val'] = 1;
- $retvalue['error'] = $result->getMessage();
- if ($debug)
- printf("Radius send failed: %s", $retvalue['error']);
- } else if ($result === true) {
- $retvalue['auth_val'] = 2;
- if ($debug)
- printf (gettext("Radius Auth succeeded"));
- $ret = true;
- } else {
- $retvalue['auth_val'] = 3;
- if ($debug)
- printf (gettext("Radius Auth rejected"));
- }
- // close OO RADIUS_AUTHENTICATION
- $rauth->close();
-
- return $ret;
- } // end function
-}
-
-class LdapBackend extends AbstractBackend {
- function LdapBackend() {
- }
-
- function authenticate($username, $passwd) {
- $ldapserver = $config['system']['ldap']['server'];
- $ldapport = isset($config['system']['ldap']['port']) ? $config['system']['ldap']['server'] : 389;
- $retval = false;
-
- $connection = ldap_connect($ldapserver, $ldapport)
- or die("Could not connect to $ldaphost");
-
- if ($connection) {
- $bind = ldap_bind($connection);
-
- if ($bind) {
- $basedn = $config['system']['ldap']['basedn'];
- $result = ldap_search($connection, $basedn, "uid={$username}");
- $info = ldap_get_entries($connection, $result);
- $userPassword = $info[0]['userPassword'];
-
- if ($userPassword == $passwd) {
- $retval = true;
- } else {
- $retval = false;
- }
- } // end if
- } // end if
-
- return $retval;
- }
-}
-?> \ No newline at end of file
diff --git a/config/authng/pkg/authng_classdefs.inc b/config/authng/pkg/authng_classdefs.inc
deleted file mode 100644
index 64f0ff14..00000000
--- a/config/authng/pkg/authng_classdefs.inc
+++ /dev/null
@@ -1,479 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_classdefs.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-class Object {
- function Object() {
- $args = func_get_args();
- if (method_exists($this, '__destruct')) {
- register_shutdown_function(array(&$this, '__destruct'));
- }
- call_user_func_array(array(&$this, '__construct'), $args);
- }
-
- function __construct() {
- }
-}
-
-class SingletonInterface extends Object {
- function __construct() {
- // Perform object initialization here.
- }
-
- function &__getInstanceImp($name) {
- static $instances = array();
- if (!isset($instances[$name])) {
- $instances[$name] = new $name(); // No changes necessary here.
- }
- return $instances[$name];
- }
-
- function &getInstance() {
- trigger_error('SingletonInterface::getInstance() needs to be overridden in a subclass.', E_USER_ERROR);
- }
-}
-
-class BackendFactory extends SingletonInterface {
- function __construct() {
- // Perform object initialization here.
- parent::__construct();
- }
-
- function &getInstance() {
- return parent::__getInstanceImp('BackendFactory');
- }
-
- function &getBackendByName($name) {
- $result = null;
-
- /* Each name links to an entry in config.xml
- * Example: <auth_method>session</auth_method>
- */
- switch ($name) {
- case "htpasswd":
- $result = new HtpasswdBackend();
- break;
- case "pam":
- $result = new PamBackend();
- break;
- case "radius":
- $result = new RadiusBackend();
- break;
- case "passwd":
- $result = new PasswdBackend();
- break;
- case "ldap":
- $result = new LdapBackend();
- break;
- default:
- }
-
- return $result;
- }
-}
-
-class AuthMethodFactory extends SingletonInterface {
- function __construct() {
- // Perform object initialization here.
- parent::__construct();
- }
-
- function &getInstance() {
- return parent::__getInstanceImp('AuthMethodFactory');
- }
-
- function &getAuthMethodByName($name) {
- $result = null;
-
- /* Each name links to an entry in config.xml
- * Example: <backing_method>htpasswd</backing_method>
- */
- switch ($name) {
- case "session":
- $result = new SessionAuthMethod();
- break;
- case "basic":
- $result = new BasicAuthMethod();
- break;
- default:
- }
-
- return $result;
- }
-}
-
-class AuthngAuxiliary {
- /* ========================================================================== */
- /* == Auxiliary Functions == */
- /* ========================================================================== */
- function &getSystemAdminNames() {
- global $config, $g, $userindex;
- $adminUsers = array();
-
- if (is_array($config['system']['user'])) {
- foreach($config['system']['user'] as $user){
- if (isSystemAdmin($user['name'])) {
- $adminUsers[] = $user['name'];
- }
- } // end foreach
- } // end if
-
- return $adminUsers;
- } // end function
-
- function assignUID($username = "") {
- global $userindex, $config, $g;
-
- if ($username == "") { return; }
-
- $nextuid = $config['system']['nextuid'];
- $user =& $config['system']['user'][$userindex[$username]];
-
- if (empty($user['uid'])) {
- $user['uid'] = $nextuid;
- $nextuid++;
- $config['system']['nextuid'] = $nextuid;
-
- write_config();
-
- return $user;
- } // end if
- } // end function
-}
-
-class AuthngPrivilege {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $id;
- var $name;
- var $description;
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function AuthngPrivilege() {
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- function getId() {
- return $this->id;
- }
-
- function setId($id) {
- $this->id = $id;
- }
-
- function getName() {
- return $this->name;
- }
-
- function setName($name) {
- $this->name = $name;
- }
-
- function getDescription() {
- return $this->description;
- }
-
- function setDescription($desc) {
- $this->description = $desc;
- }
-}
-
-class SystemPrivileges {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $privileges = array();
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function SystemPrivileges() {
- $newPriv = new Privilege();
- $newPriv->setId("lockwc");
- $newPriv->setName("Lock webConfigurator");
- $newPriv->setDescription("Indicates whether this user will lock access to the webConfigurator for other users.");
-
- $this->privileges[$newPriv->getId()] = $newPriv;
-
- $newPriv = new Privilege();
- $newPriv->setId("lock-ipages");
- $newPriv->setName("Lock individual pages");
- $newPriv->setDescription("Indicates whether this user will lock individual " .
- "HTML pages after having accessed a particular page" .
- "(the lock will be freed if the user leaves or " .
- "saves the page form).");
-
- $this->privileges[$newPriv->getId()] = $newPriv;
-
- $newPriv = new Privilege();
- $newPriv->setId("hasshell");
- $newPriv->setName("Has shell access");
- $newPriv->setDescription("Indicates whether this user is able to login for " .
- "example via SSH.");
-
- $this->privileges[$newPriv->getId()] = $newPriv;
-
- $newPriv = new Privilege();
- $newPriv->setId("copyfiles");
- $newPriv->setName("Is allowed to copy files");
- $newPriv->setDescription("Indicates whether this user is allowed to copy files " .
- "onto the {$g['product_name']} appliance via SCP/SFTP. " .
- "If you are going to use this privilege, you must install " .
- "scponly on the appliance (Hint: pkg_add -r scponly).");
-
- $this->privileges[$newPriv->getId()] = $newPriv;
-
- $newPriv = new Privilege();
- $newPriv->setId("isroot");
- $newPriv->setName("Is root user");
- $newPriv->setDescription("This user is associated with the UNIX root user " .
- "(you should associate this privilege only with one " .
- "single user).");
-
- $this->privileges[$newPriv->getId()] = $newPriv;
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- function getPrivileges() {
- return $this->privileges;
- }
-
- function setPrivileges($privs) {
- $this->privileges = $privs;
- }
-
- function getPrivilegeById($id) {
- return $this->privileges[$id];
- }
-
- function setPrivilegeById($privilege, $id) {
- return $this->privileges[$id] = $privilege;
- }
-}
-
-class AuthngUser {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $name;
- var $fullname;
- var $scope;
- var $groupname;
- var $password;
- var $uid;
- var $systemAdmin = false;
- var $unixRoot = false;
- var $privileges = array();
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function AuthngUser() {
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- function isSystemAdmin() {
- return $this->systemAdmin;
- }
-
- function setIsSystemAdmin($flag = false) {
- $this->systemAdmin = $flag;
- }
-
- function isUNIXRoot() {
- return $this->unixRoot;
- }
-
- function setIsUNIXRoot($flag = false) {
- $this->unixRoot = $flag;
- }
-
- function getName() {
- return $this->name;
- }
-
- function setName($name) {
- $this->name = $name;
- }
-
- function getFullname() {
- return $this->fullname;
- }
-
- function setFullname($name) {
- $this->fullname = $name;
- }
-
- function getScope() {
- return $this->scope;
- }
-
- function setScope($scope) {
- $this->scope = $scope;
- }
-
- function getGroupname() {
- return $this->groupname;
- }
-
- function setGroupname($name) {
- $this->groupname = $name;
- }
-
- function getPassword() {
- return $this->password;
- }
-
- function setPassword($pwd) {
- $this->password = $pwd;
- }
-
- function getUid() {
- return $this->uid;
- }
-
- function setUid($uid) {
- $this->uid = $uid;
- }
-
- function getPrivileges() {
- return $this->privileges;
- }
-
- function setPrivileges($privs) {
- $this->privileges = $privs;
- }
-
- function addPrivilege($priv) {
- $this->privileges[] = $priv;
- }
-}
-
-class AuthngGroup {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $name;
- var $description;
- var $scope;
- var $pages = array();
- var $home;
- var $gid;
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function AuthngGroup() {
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- function getName() {
- return $this->name;
- }
-
- function setName($name) {
- $this->name = $name;
- }
-
- function getDescription() {
- return $this->description;
- }
-
- function setDescription($desc) {
- $this->description = $desc;
- }
-
- function getScope() {
- return $this->scope;
- }
-
- function setScope($scope) {
- $this->scope = $scope;
- }
-
- function getPages() {
- return $this->pages;
- }
-
- function setPages($pages) {
- $this->pages = $pages;
- }
- function getHome() {
- return $this->home;
- }
-
- function setHome($home) {
- $this->home = $home;
- }
-
- function getGid() {
- return $this->gid;
- }
-
- function setGid($gid) {
- $this->gid = $gid;
- }
-
- function addPage($page) {
- $this->pages[] = $page;
- }
-}
-
-?> \ No newline at end of file
diff --git a/config/authng/pkg/authng_peers.inc b/config/authng/pkg/authng_peers.inc
deleted file mode 100644
index bce3c494..00000000
--- a/config/authng/pkg/authng_peers.inc
+++ /dev/null
@@ -1,501 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_peers.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-class PeerFactory extends SingletonInterface {
- function __construct() {
- // Perform object initialization here.
- parent::__construct();
- }
-
- function &getInstance() {
- return parent::__getInstanceImp('PeerFactory');
- }
-
- function &getGroupPeerByPrincipalStore($store) {
- $result = null;
-
- /* Each name links to an entry in config.xml
- * Example: <principal_store>xml</principal_store>
- */
- switch ($store) {
- case "xml":
- $result = new XMLGroupPeer();
- break;
- case "ldap":
- trigger_error('PeerFactory::getGroupPeerByPrincipal() LDAP peer type is not supported.', E_USER_ERROR);
- break;
- case "db":
- trigger_error('PeerFactory::getGroupPeerByPrincipal() DB peer type is not supported.', E_USER_ERROR);
- break;
- default:
- }
-
- return $result;
- }
-
- function &getUserPeerByPrincipalStore($store) {
- $result = null;
-
- /* Each name links to an entry in config.xml
- * Example: <principal_store>xml</principal_store>
- */
- switch ($store) {
- case "xml":
- $result = new XMLUserPeer();
- break;
- case "ldap":
- trigger_error('PeerFactory::getGroupPeerByPrincipal() LDAP peer type is not supported.', E_USER_ERROR);
- break;
- case "db":
- trigger_error('PeerFactory::getGroupPeerByPrincipal() DB peer type is not supported.', E_USER_ERROR);
- break;
- default:
- }
-
- return $result;
- }
-}
-
-/**
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- * @abstract
- */
-class AbstractPrivilegePeer {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $privilege_index;
- var $privileges;
- var $userPeer;
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function AbstractPrivilegePeer() {
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- function setUserPeer($peer) {
- $this->userPeer = $peer;
- }
-
- function getUserPeer() {
- return $this->userPeer;
- }
-
- /**
- * @return mixed int array of priv indexes
- */
- function getPrivilegeIndex() {
- return $this->privilege_index;
- }
-
- /**
- * @param string a priv name
- * @return int the index that corresponds to a username
- */
- function getPrivilegeIndexByID($id) {
- return $this->privilege_index[$id];
- }
-
- /**
- * @param int an index
- * @return mixed an instance of AuthngPrivilege
- */
- function getPrivilegeByIndex($index) {
- return $this->privileges[$index];
- }
-}
-
-/**
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- * @abstract
- */
-class AbstractUserPeer {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $user_index;
- var $users;
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function AbstractUserPeer() {
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- /**
- * @return mixed int array of user indexes
- */
- function getUserIndex() {
- return $this->user_index;
- }
-
- /**
- * @param string a username
- * @return int the index that corresponds to a username
- */
- function getUserIndexByName($username) {
- return $this->user_index[$username];
- }
-
- /**
- * @param int an index
- * @return mixed an instance of AuthngUser
- */
- function getUserByIndex($index) {
- return $this->users[$index];
- }
-
- function getUserByName($username) {
- return $this->users[$username];
- }
-
- function isSystemAdmin($username) {
- $result = false;
- $user = $this->getUserByName($username);
-
- if ($user) {
- $result = $user->isSystemAdmin();
- }
-
- return $result;
- }
-}
-
-/**
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- * @abstract
- */
-class AbstractGroupPeer {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- var $group_index;
- var $groups;
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function AbstractGroupPeer() {
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- function getGroupIndex() {
- return $this->group_index;
- }
-
- function getGroupIndexByName($groupname) {
- return $this->group_index[$groupname];
- }
-
- function getGroupByIndex($index) {
- return $this->groups[$index];
- }
-
- function getGroupByName($groupname) {
- return $this->groups[$groupname];
- }
-
- function getGroupHomePage($groupname) {
- $result = false;
- $group = $this->getGroupByName($groupname);
-
- if ($group) {
- $result = $group->getHome();
- }
-
- return $result;
- }
-}
-
-/**
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- */
-class XMLPrivilegePeer extends AbstractPrivilegePeer {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function XMLPrivilegePeer($userPeer) {
- global $g, $config;
-
- parent::AbstractPrivilegePeer();
-
- $this->setUserPeer($peer);
-
- foreach ($peer->users as $userent) {
- foreach ($userent->getPrivileges() as $privent) {
- $this->privileges[$userent->getName()] = $privent;
- }
- }
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- /* ========================================================================== */
- /* == Helper Methods == */
- /* ========================================================================== */
-
- function addPrivilegeFromEnt(&$ent) {
- $newPrivilege = new AuthngUser();
- $newPrivilege->setId($ent['id']);
- $newPrivilege->setName($ent['name']);
- $newPrivilege->setDescription($ent['description']);
- $newPrivilege->setPassword($ent['password']);
- $newPrivilege->setUid($ent['uid']);
-
- $this->privileges[] = $newPrivilege;
- }
-
- function setPrivilegeID($id, $name, $username) {
- $userid = getPrivilegeIndexByName($username);
- $user = $config['system']['user'][$userid];
- }
-
- function setFullName($id, $name) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['fullname'] = $name;
- }
-
- function setGroupName($id, $name) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['groupname'] = $name;
- }
-
- function setPassword($id, $pwd) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['password'] = $pwd;
- }
-
- function setUid($id, $uid) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['uid'] = $uid;
- }
-}
-
-/**
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- */
-class XMLUserPeer extends AbstractUserPeer {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function XMLUserPeer() {
- global $g, $config;
-
- parent::AbstractUserPeer();
-
- if (isset($config['system']['user'])) {
- $i = 0;
-
- foreach($config['system']['user'] as $userent) {
- $this->user_index[$userent['name']] = $i;
- $this->addUserFromEnt($userent);
- $i++;
- }
- }
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- /* ========================================================================== */
- /* == Helper Methods == */
- /* ========================================================================== */
-
- function addUserFromEnt(&$ent) {
- print "HURTZ";
- $newUser = new AuthngUser();
- $newUser->setName($ent['name']);
- $newUser->setFullname($ent['fullname']);
- $newUser->setGroupname($ent['groupname']);
- $newUser->setPassword($ent['password']);
- $newUser->setUid($ent['uid']);
-
- if ($ent['priv'] && is_array($ent['priv'])) {
- foreach ($ent['priv'] as $privent) {
- $newPrivilege = new Privilege();
- $newPrivilege->setId($privent['id']);
- $newPrivilege->setName($privent['name']);
- $newPrivilege->setDescription($privent['description']);
-
- $newUser->addPrivilege($newPrivilege);
- }
- }
-
- $this->users["${ent['name']}"] = $newUser;
- }
-
- function setUserName($id, $name) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['name'] = $name;
- }
-
- function setFullName($id, $name) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['fullname'] = $name;
- }
-
- function setGroupName($id, $name) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['groupname'] = $name;
- }
-
- function setPassword($id, $pwd) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['password'] = $pwd;
- }
-
- function setUid($id, $uid) {
- $userid = getUserIndexByName($id);
- $config['system']['user'][$userid]['uid'] = $uid;
- }
-}
-
-/**
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- */
-class XMLGroupPeer extends AbstractGroupPeer {
- /* ========================================================================== */
- /* == Class Members == */
- /* ========================================================================== */
-
- /* ========================================================================== */
- /* == Constructor == */
- /* ========================================================================== */
-
- function XMLGroupPeer() {
- global $g, $config;
-
- parent::AbstractGroupPeer();
-
- if (isset($config['system']['group'])) {
- $i = 0;
-
- foreach($config['system']['group'] as $groupent) {
- $this->group_index[$groupent['name']] = $i;
- $i++;
- }
- }
- }
-
- /* ========================================================================== */
- /* == Accessors == */
- /* ========================================================================== */
-
- /* ========================================================================== */
- /* == Helper Methods == */
- /* ========================================================================== */
-
- function addGroupFromEnt(&$ent) {
- $newGoup = new AuthngGroup();
- $newGoup->setName($ent['name']);
- $newGoup->setDescription($ent['description']);
- $newGoup->setScope($ent['scope']);
- $newGoup->setHome($ent['home']);
- $newGoup->setGid($ent['gid']);
-
- if ($ent['pages'] && is_array($ent['gid'])) {
- foreach ($ent['pages'] as $pageent) {
- $newGoup->addPage($pageent);
- }
- }
-
- $this->groups["${ent['name']}"] = $newGoup;
- }
-
- function setGroupName($id, $name) {
- $groupid = getGroupIndexByName($id);
- $config['system']['group'][$groupid]['name'] = $name;
- }
-
- function setGroupDescription($id, $desc) {
- $groupid = getGroupIndexByName($id);
- $config['system']['group'][$groupid]['description'] = $desc;
- }
-
- function setGroupScope($id, $scope) {
- $groupid = getGroupIndexByName($id);
- $config['system']['group'][$groupid]['scope'] = $scope;
- }
-
- function setGroupHome($id, $home) {
- $groupid = getGroupIndexByName($id);
- $config['system']['group'][$groupid]['home'] = $home;
- }
-
- function setGroupGid($id, $gid) {
- $groupid = getGroupIndexByName($id);
- $config['system']['group'][$groupid]['gid'] = $gid;
- }
-
- function addPageToGroup($id, $page) {
- $groupid = getGroupIndexByName($id);
- $config['system']['group'][$groupid]['pages'][] = $page;
- }
-}
-?>
diff --git a/config/authng/pkg/authng_usermanager.inc b/config/authng/pkg/authng_usermanager.inc
deleted file mode 100644
index f96759fb..00000000
--- a/config/authng/pkg/authng_usermanager.inc
+++ /dev/null
@@ -1,247 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_usermanager.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-function initUserFromGetVars() {
- if ($_GET['act'] == "edit") {
- if (isset($id) && $a_user[$id]) {
- $pconfig['usernamefld'] = $a_user[$id]['name'];
- $pconfig['fullname'] = $a_user[$id]['fullname'];
- $pconfig['groupname'] = $a_user[$id]['groupname'];
- $pconfig['utype'] = $a_user[$id]['scope'];
- $pconfig['authorizedkeys'] = base64_decode($a_user[$id]['authorizedkeys']);
- }
- } else if ($_GET['act'] == "new") {
- /* set this value cause the text field is read only
- * and the user should not be able to mess with this
- * setting.
- */
- $pconfig['utype'] = "user";
- }
-}
-function processUserManagerPostVarsUser() {
- if (isset($_POST['save'])) {
- unset($input_errors);
-
- /* input validation */
- $reqdfields = explode(" ", "passwordfld1");
- $reqdfieldsn = explode(",", "Password");
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- if ($_POST['passwordfld1'] != $_POST['passwordfld2'])
- $input_errors[] = "The passwords do not match.";
-
- if (!$input_errors) {
- // all values are okay --> saving changes
- $config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['password'] = crypt(trim($_POST['passwordfld1']));
-
- write_config();
-
- sync_webgui_passwords();
-
- $retval = system_password_configure();
- $savemsg = get_std_save_message($retval);
- $savemsg = "Password successfully changed<br />";
- }
- }
-}
-
-function processUserManagerPostVarsAdmin() {
- $id = $_GET['id'];
- if (isset($_POST['id']))
- $id = $_POST['id'];
-
- if (!is_array($config['system']['user'])) {
- $config['system']['user'] = array();
- }
-
- admin_users_sort();
- $a_user = &$config['system']['user'];
- $t_privs = $a_user[$id]['priv'];
-
- if ($_GET['act'] == "del" && $_GET['what'] == "user") {
- if ($a_user[$_GET['id']]) {
- $userdeleted = $a_user[$_GET['id']]['name'];
- unset($a_user[$_GET['id']]);
- write_config();
- $retval = system_password_configure();
- $savemsg = get_std_save_message($retval);
- $savemsg = gettext("User") . " " . $userdeleted . " " . gettext("successfully deleted") . "<br />";
- }
- } else if ($_GET['act'] == "del" && $_GET['what'] == "priv") {
- if ($t_privs[$_GET['privid']]) {
- $privdeleted = $t_privs[$_GET['privid']]['id'];
- unset($t_privs[$_GET['privid']]);
- write_config();
- $_GET['act'] = "edit";
- $retval = 0;
- $savemsg = get_std_save_message($retval);
- $savemsg = gettext("Privilege") . " " . $privdeleted . " " . gettext("of user") . " " . $a_user[$_GET['id']]['name'] . " " . gettext("successfully deleted") . "<br />";
- }
- }
-
- if ($_POST) {
- unset($input_errors);
- $pconfig = $_POST;
-
- /* input validation */
- if (isset($id) && ($a_user[$id])) {
- $reqdfields = explode(" ", "usernamefld");
- $reqdfieldsn = explode(",", "Username");
- } else {
- $reqdfields = explode(" ", "usernamefld passwordfld1");
- $reqdfieldsn = explode(",", "Username,Password");
- }
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- if (hasShellAccess($_POST['usernamefld'])) {
- if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['usernamefld']))
- $input_errors[] = gettext("The username contains invalid characters.");
- } else {
- if (preg_match("/[^a-zA-Z0-9\@\.\-_]/", $_POST['usernamefld']))
- $input_errors[] = gettext("The username contains invalid characters.");
- }
-
- if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2']))
- $input_errors[] = gettext("The passwords do not match.");
-
- if (!$input_errors && !(isset($id) && $a_user[$id])) {
- /* make sure there are no dupes */
- foreach ($a_user as $userent) {
- if ($userent['name'] == $_POST['usernamefld']) {
- $input_errors[] = gettext("Another entry with the same username already exists.");
- break;
- }
- }
- }
-
- if ($pconfig['utype'] <> "system" && !isset($groupindex[$_POST['groupname']])) {
- $input_errors[] = gettext("group does not exist, please define the group before assigning users.");
- }
-
- if (isset($config['system']['ssh']['sshdkeyonly']) &&
- empty($_POST['authorizedkeys'])) {
- $input_errors[] = gettext("You must provide an authorized key otherwise you won't be able to login into this system.");
- }
-
- /* if this is an AJAX caller then handle via JSON */
- if (isAjax() && is_array($input_errors)) {
- input_errors2Ajax($input_errors);
- exit;
- }
-
- if (!$input_errors) {
- if (isset($id) && $a_user[$id])
- $userent = $a_user[$id];
-
- /* the user did change his username */
- if ($_POST['usernamefld'] <> $_POST['oldusername']) {
- $_SERVER['REMOTE_USER'] = $_POST['usernamefld'];
- }
-
- $userent['name'] = $_POST['usernamefld'];
- $userent['fullname'] = $_POST['fullname'];
- if ($pconfig['utype'] <> "system") {
- $userent['groupname'] = $_POST['groupname'];
- }
- isset($_POST['utype']) ? $userent['scope'] = $_POST['utype'] : $userent['scope'] = "system";
-
- if ($_POST['passwordfld1'])
- $userent['password'] = crypt($_POST['passwordfld1']);
-
- if(isset($config['system']['ssh']['sshdkeyonly'])) {
- $userent['authorizedkeys'] = base64_encode($_POST['authorizedkeys']);
- }
-
- if (isset($id) && $a_user[$id])
- $a_user[$id] = $userent;
- else
- $a_user[] = $userent;
-
- write_config();
- $retval = system_password_configure();
- sync_webgui_passwords();
-
- pfSenseHeader("system_usermanager.php");
- }
- }
-}
-
-/**
- * getWindowJSScriptRefs()
- *
- * @return
- */
-function getWindowJSScriptRefs(){
- $result = array('<script type="text/javascript" src="/javascripts/windows-js/javascript/effects.js"></script>',
- '<script type="text/javascript" src="/javascripts/windows-js/javascript/window.js"></script>',
- '<script type="text/javascript" src="/javascripts/windows-js/javascript/window_effects.js"></script>',
- '<script type="text/javascript" src="/javascripts/windows-js/javascript/window_effects.js"></script>',
- '<script type="text/javascript" src="/javascripts/windows-js/javascript/debug.js"></script>');
-
- return $result;
-}
-
-/**
- * openNoUserDefsDialog()
- *
- * @param mixed $effectClass
- * @return
- */
-function openNoUserDefsDialog($effectClass) {
- if (empty($config['installedpackages']['authng']['config'])) {
- $alertMessage = gettext("No users or group found. You will be forwarded to the AuthNG wizard to be able to define users and groups.");
- $dialogScript = "
- <script type='text/javascript'>
- function forwardToWizard() {
- window.location.href = '/wizard.php?xml=authng_wizard.xml';
- }
-
- function openNoUserDefsDialog(html) {
- var effect = new PopupEffect(html, {className: '${effectClass}'});
- Dialog.alert('${alertMessage},{className:'alphacube', width: 400, height:null, showEffect:effect.show.bind(effect), hideEffect:effect.hide.bind(effect), onOk:forwardToWizard});
- }
- </script>
- ";
-
- return $dialogScript;
- }
-}
-
-?> \ No newline at end of file
diff --git a/config/authng/www/js/headjs.inc b/config/authng/www/js/headjs.inc
deleted file mode 100644
index 73c0a4db..00000000
--- a/config/authng/www/js/headjs.inc
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-
-function getHeadJS() {
- global $_SERVER, $HTTP_SERVER_VARS, $g, $use_loader_tab_gif;
-
- if(!$use_loader_tab_gif)
- $loader_gif = "/themes/{$g['theme']}/images/misc/loader.gif";
- else
- $loader_gif = "/themes/{$g['theme']}/images/misc/loader_tab.gif";
-
- $headjs = "
- var input_errors = '';
- Event.observe(window, 'load', init, false);
- ";
-
- $_SESSION['NO_AJAX'] == "True" ? $noajax = "var noAjaxOnSubmit = true;" : $noajax = "var noAjaxOnSubmit = false;";
-
- $headjs .= "
- {$noajax}
-
- function init() {
- if($('submit') && ! noAjaxOnSubmit) {
- // debugging helper
- //alert('adding observe event for submit button');
-
- Event.observe(\"submit\", \"click\", submit_form, false);
- $('submit').onclick = function() {return false;};
- var to_insert = \"<div style='visibility:hidden' id='loading' name='loading'><img src='{$loader_gif}' \/><\/div>\";
- new Insertion.Before('submit', to_insert);
- }
- }
-
- function submit_form(e){
- // debugging helper
- //alert(Form.serialize($('iform')));
-
- if($('inputerrors'))
- $('inputerrors').innerHTML = '';
-
- /* dsh: Introduced because pkg_edit tries to set some hidden fields
- * if executing submit's onclick event. Tho click gets deleted
- * by Ajax. Hence using onkeydown instead.
- */
- if($('submit') && $('submit').onkeydown)
- $('submit').onkeydown();
- if($('submit'))
- $('submit').style.visibility = 'hidden';
- if($('cancelbutton'))
- $('cancelbutton').style.visibility = 'hidden';
- $('loading').style.visibility = 'visible';
- // submit the form using Ajax
- ";
-
-
- isset($HTTP_SERVER_VARS['AUTH_USER']) ? $scriptName = split("/", $_SERVER["SCRIPT_FILENAME"]) : $scriptName = split("/", "/index.php");
- isset($HTTP_SERVER_VARS['AUTH_USER']) ? $loggedin = "var isLoggedIn = true;" : $loggedin = "var isLoggedIn = false;";
- $scriptElms = count($scriptName);
- $scriptName = $scriptName[$scriptElms-1];
- $realScriptName = $_SERVER["SCRIPT_NAME"];
-
- $headjs .= "
- {$loggedin}
-
- if (! isLoggedIn) {
- var newInput = document.createElement('input');
- newInput.setAttribute('id', 'scriptname');
- newInput.setAttribute('name', 'scriptname');
- newInput.setAttribute('value', '$realScriptName');
- newInput.setAttribute('type', 'hidden');
-
- $('iform').appendChild(newInput);
- }
-
- new Ajax.Request('{$scriptName}', {
- method : 'post',
- parameters : Form.serialize($('iform')),
- onSuccess : formSubmitted,
- onFailure : formFailure
- });
- }
-
- function formSubmitted(resp) {
- var responseText = resp.responseText;
-
- // debugging helper
- //alert(responseText);
-
- if(responseText.indexOf('html') > 0) {
- /* somehow we have been fed an html page! */
- //alert('Somehow we have been fed an html page! Forwarding to /.');
- document.location.href = '/';
- }
-
- eval(responseText);
- }
-
- /* this function will be called if an HTTP error will be triggered */
- function formFailure(resp) {
- alert('An error occured while saving the data ' + resp.responseText);
- }
-
- function showajaxmessage(message) {
- var message_html;
-
- if (message == '') {
- NiftyCheck();
- Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");
- Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\");
-
- if($('submit'))
- $('submit').style.visibility = 'visible';
- if($('cancelbutton'))
- $('cancelbutton').style.visibility = 'visible';
- if($('loading'))
- $('loading').style.visibility = 'hidden';
-
- return;
- }
-
- message_html = '<table height=\"32\" width=\"100%\"><tr><td>';
- message_html += '<div style=\"background-color:#990000\" id=\"redbox\">';
- message_html += '<table width=\"100%\"><tr><td width=\"8%\">';
- message_html += '&nbsp;&nbsp;&nbsp;';
- message_html += '<img style=\"vertical-align:middle\" src=\"/themes/{$g['theme']}/images/icons/icon_exclam.gif\" width=\"28\" height=\"32\" \/>';
- message_html += '<\/td><td width=\"70%\"><font color=\"white\">';
- message_html += '<b>' + message + '<\/b><\/font><\/td>';
-
- if(message.indexOf('apply') > 0) {
- message_html += '<td>';
- message_html += '<input name=\"apply\" type=\"submit\" class=\"formbtn\" id=\"apply\" value=\"" . gettext("Apply changes") . "\" \/>';
- message_html += '<\/td>';
- }
-
- message_html += '<\/tr><\/table><\/div><\/td><\/table><br \/>';
- $('inputerrors').innerHTML = message_html;
-
- NiftyCheck();
- Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");
- Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\");
-
- if($('submit'))
- $('submit').style.visibility = 'visible';
- if($('cancelbutton'))
- $('cancelbutton').style.visibility = 'visible';
- if($('loading'))
- $('loading').style.visibility = 'hidden';
- if($('inputerrors'))
- window.scrollTo(0, 0);
- if($('inputerrors'))
- new Effect.Shake($('inputerrors'));
- }
- ";
-
- return $headjs;
-}
-
-?>
diff --git a/config/authng/www/php/head.inc b/config/authng/www/php/head.inc
deleted file mode 100644
index 5365c715..00000000
--- a/config/authng/www/php/head.inc
+++ /dev/null
@@ -1,669 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_classdefs.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-require("headjs.inc");
-
-/* if user has selected a custom template, use it.
- * otherwise default to pfsense tempalte
- */
-if($config['theme'] <> "") {
- $g['theme'] = $config['theme'];
-} else {
- $g['theme'] = "pfsense";
-}
-
-// navigation level separator string
-$navlevelsep = ": ";
-
-function gentitle($title) {
- global $navlevelsep;
-
- if(!is_array($title)) {
- return $title;
- }
-
- return join($navlevelsep, $title);
-}
-
-function genhtmltitle($title) {
- global $config;
- //return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . gentitle($title);
- return gentitle($title);
-}
-
-$scriptName = split("/", $_SERVER["SCRIPT_FILENAME"]);
-$scriptElms = count($scriptName);
-$scriptName = $scriptName[$scriptElms-1];
-
-$pfSenseHead = new pfSenseHTMLHead();
-$pfSenseHead->setCloseHead(true);
-$pfSenseHead->setTitle(genhtmltitle($pgtitle));
-
-/* all.css has to be treated a bit different, compared to generic stylesheets */
-$allID = $pfSenseHead->addLink("<link rel=\"stylesheet\" type=\"text/css\" href=\"/themes/" . $g['theme'] . "/all.css\" media=\"all\" />\n");
-$pfSenseHead->setAllCssID($allID);
-
-$pfSenseHead->addLink("<link rel='shortcut icon' href='/themes/{$g['theme']}/images/icons/favicon.ico' />\n");
-$pfSenseHead->addScript("<script type='text/javascript'>\nvar theme = '" . $g['theme'] . "';\nvar dontUseCustomBGColor = true;\n</script>\n", 1);
-$pfSenseHead->addScript("<script type='text/javascript' src=\"/themes/" . $g['theme'] . "/loader.js\"></script>\n", 2);
-//TODO: if ((($_POST || $_GET || isAjax()) &&
-if ((($_POST || $_GET) &&
- is_array($error_bucket)) ||
- strpos($_SERVER['SCRIPT_NAME'], "wizard.php") !== false) {
- $pfSenseHead->addScript("<script type='text/javascript' src='/javascript/domTT/domLib.js'></script>", 500);
- $pfSenseHead->addScript("<script type='text/javascript' src='/javascript/domTT/domTT.js'></script>", 510);
- $pfSenseHead->addScript("<script type='text/javascript' src='/javascript/domTT/behaviour.js'></script>", 520);
- $pfSenseHead->addScript("<script type='text/javascript' src='/javascript/domTT/fadomatic.js'></script>", 530);
-}
-
-/*
- * Find all javascript files that need to be included
- * for this page ... from the arrays ... :)
- * Coded by: Erik Kristensen
- */
-$scriptWeight = 100;
-
-$dir = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
-$path = "/usr/local/www/javascript/" . $dir . "/";
-if (is_dir($path)) {
- if ($dh = opendir($path)) {
- while (($file = readdir($dh)) !== false) {
- if (is_dir($file)) { continue; }
- if (strpos($file, ".js") === false) { continue; }
-
- $pfSenseHead->addScript("<script type='text/javascript' src='/javascript/{$dir}/{$file}'></script>\n", $scriptWeight);
- $scriptWeight++;
- }
- closedir($dh);
- }
-}
-
-/*
- * Find all JavaScript files that may be provided by the current theme
- * TODO: Commented because this pulls in PHP5 specific stuff from the theme.
- *
- */
-//$path = "/usr/local/www/themes/{$g['theme']}/javascript/";
-
-//if (is_dir($path)) {
-// if ($dh = opendir($path)) {
-// while (($file = readdir($dh)) !== false) {
-// if (is_dir($file)) { continue; }
-// if (strpos($file, ".js") !== false) {
-// $pfSenseHead->addScript("<script type='text/javascript' src='/themes/{$g['theme']}/javascript/{$file}'></script>\n", $scriptWeight);
-// } else if (strpos($file, ".php") !== false &&
-// strpos($file, "-head") !== false &&
-// strpos($file, ".disabled") === false) {
-// $filename = ucfirst(trim(trim($file, '.php'), '-head'));
-// require_once("themes/{$g['theme']}/javascript/{$file}");
-
-// if (function_exists("{$g['theme']}{$filename}GetHeadJS")) {
-// $jsfunction = "{$g['theme']}{$filename}GetHeadJS";
-// $jscript = $jsfunction();
-// $pfSenseHead->addScript("<script type='text/javascript'>\n<!--\n{$jscript}\n-->\n</script>\n", $scriptWeight);
-// }
-// } else {
-// continue;
-// }
-
-// $scriptWeight++;
-// }
-// closedir($dh);
-// }
-//}
-
-/*
- * Find all JavaScript events that may be provided by the current theme
- *
- */
-$path = "/usr/local/www/themes/{$g['theme']}/jsevents/";
-if (is_dir($path)) {
- if ($dh = opendir($path)) {
- while (($file = readdir($dh)) !== false) {
- if (is_dir($file)) { continue; }
- if (strpos($file, ".def") !== false) {
- if (empty($jsevents)) { $jsevents = array(); }
-
- switch ($file) {
- case "body.def":
- $contents = file_get_contents("/usr/local/www/themes/{$g['theme']}/jsevents/{$file}");
- $contents_a = split("\n", $contents);
- foreach ($contents_a as $line) {
- if (strpos($line, "#") === 0) { continue; }
- if (strpos($line, "!") !== false) {
- $events_forbidden_pages = split("!", $line);
- $keyval = split("=", $events_forbidden_pages[0]);
-
- if (strpos($events_forbidden_pages[1], basename($_SERVER['SCRIPT_NAME'])) !== false) { continue; }
- } else {
- $keyval = split("=", $line);
- }
- $jsevents["body"][$keyval[0]] = $keyval[1];
- }
- break;
- }
- } else {
- continue;
- }
- }
- closedir($dh);
- }
-}
-
-/*
- * Find all CSS files that may be provided by the current theme
- * TODO: Not needed right now.
- */
-//$path = "/usr/local/www/themes/{$g['theme']}/styles/";
-//if (is_dir($path)) {
-// if ($dh = opendir($path)) {
-// while (($file = readdir($dh)) !== false) {
-// if (is_dir($file)) { continue; }
-// if (strpos($file, ".css") === false) { continue; }
-
-// $pfSenseHead->addLink("<link rel='stylesheet' type='text/css' href='/themes/{$g['theme']}/styles/{$file}' media='all' />\n");
-// }
-// closedir($dh);
-// }
-//}
-
-if ($oSajax) {
-$pfSenseHead->addScript("<script type='text/javascript'>\n" .
- $oSajax->sajax_get_javascript() . "\n</script>\n", ++$scriptWeight);
-}
-
-// TODO: This line needs to be commented if any PHP calls
-// $pfSenseHead->getHTML(); on its own.
-//echo $pfSenseHead->getHTML();
-
-/**
- * pfSenseHTMLHead
- *
- * @package www
- * @author Daniel S. Haischt <me@daniel.stefan.haischt.name>
- * @copyright Copyright (c) 2006
- * @version $Id$
- * @access public
- **/
-class pfSenseHTMLHead
-{
- var $xmlHead = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
- var $docType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
- var $title = "UNSET";
- var $meta = array();
- var $link = array();
- var $script = array();
- var $style = array();
- var $html = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n<title>%TITLE%</title>\n%META%\n%STYLE%\n%LINK%\n%SCRIPT%";
- var $closehead = true;
- var $returnedHTML = false;
- var $allCSSID = "NOT-SET";
-
- /**
- * pfSenseHTMLHead::pfSenseHTMLHead()
- *
- * Class Konstructor
- **/
- function pfSenseHTMLHead() {
- $this->meta[] = array("meta" => " <meta http-equiv=\"Content-Type\" " .
- "content=\"text/html; charset=iso-8859-1\" />",
- "ID" => "meta-" . strval(microtime()));
- $this->link[] = array("link" => " <link rel=\"stylesheet\" type=\"text/css\" " .
- "href=\"/niftycssprintCode.css\" media=\"print\" />",
- "ID" => "link-" . strval(microtime()));
- $this->script[] = array("script" => " <script type=\"text/javascript\" " .
- "src=\"/javascript/scriptaculous/prototype.js\"></script>",
- "weight" => 3,
- "ID" => "script-" . strval(microtime()));
- $this->script[] = array("script" => " <script type=\"text/javascript\" " .
- "src=\"/javascript/scriptaculous/scriptaculous.js\"></script>",
- "weight" => 4,
- "ID" => "script-" . strval(microtime()));
-// $this->script[] = array("script" => " <script type=\"text/javascript\">\n<!--\n" . getHeadJS() . "\n//-->\n</script>",
-// "weight" => 5,
-// "ID" => "script-" . strval(microtime()));
- }
-
- /**
- * pfSenseHTMLHead::getAllCssID()
- *
- * Allows to store the ID associated with the all CSS file.
- * @return an ID
- **/
- function getAllCssID() {
- return $this->allCSSID;
- }
-
- /**
- * pfSenseHTMLHead::setAllCssID()
- *
- * Allows to set the ID associated with the all CSS file.
- * @param mixed $myID a string representing an ID that was already generated.
- **/
- function setAllCssID($myID = "") {
- if ($myID == "") { return; }
-
- $this->allCSSID = $myID;
- }
-
- /**
- * pfSenseHTMLHead::setCloseHead()
- *
- * Should the HTML &lt;head /&gt; element be closed by the class or
- * do you want to close it manually?
- * @param mixed $myCloseHead Boolean value which indicates whether &lt;head /&gt; should be closed by the class
- * @return
- **/
- function setCloseHead($myCloseHead = true) {
- $this->closehead = $myCloseHead;
- }
-
- /**
- * pfSenseHTMLHead::setTitle()
- *
- * Set the HTML &lt;title /&gt; element.
- * @param string $myTitle The title (without any markup)
- * @return NULL
- **/
- function setTitle($myTitle = "") {
- $this->title = $myTitle;
- }
-
- /**
- * pfSenseHTMLHead::addStyle()
- *
- * Allows to add a complete HTML &lt;style /&gt; element to the current
- * meta element array. You can provide an ID if you want to access your
- * particular element at a later time, for example to delete it from the
- * array etc.. If you don't provide an ID, a random ID will be generated
- * and returned.
- * @param string $myStyleElement an HTML string that represents a &lt;style /&gt; tag.
- * @param string $myID an ID that identifies this element.
- * @return the ID that identifies the particular element that you've just added.
- **/
- function addStyle($myStyleElement = "", $myID = "") {
- if ($myID == "") { $myID = "style-" . strval(microtime()); }
-
- $this->style[] = array("style" => $myStyleElement,
- "ID" => $myID);
-
- return $myID;
- }
-
- /**
- * pfSenseHTMLHead::getStyleArray()
- *
- * @return a reference to the meta element array.
- **/
- function &getStyleArray() {
- return $this->style;
- }
-
- /**
- * pfSenseHTMLHead::getStyleByID()
- *
- * Returns a reference to an array element that is identified by an ID.
- * Can be used for example to manipulate an array element after it was
- * already stored in the array.
- * @param string $myID an ID that identifies the element that should be retrieved.
- * @return a reference to an array element or NULL if the element does not exist.
- **/
- function &getStyleByID($myID = "") {
- foreach($this->style as $styleel){
- if ($styleel["ID"] == $myID) {
- return $styleel;
- }
- }
- return NULL;
- }
-
- /**
- * pfSenseHTMLHead::removeStyleByID()
- *
- * Provides a way to delete an element from an HTML element array.
- * You must provide an ID which identifies the element to be deleted.
- * @param string $myID an ID the identifies the element.
- * @return 1 if the element was found or 0 if it does not exist.
- **/
- function removeStyleByID($myID = "") {
- foreach($this->style as $styleel){
- if ($styleel["ID"] == $myID) {
- unset($styleel);
- return 1;
- }
- }
- return 0;
- }
-
- /**
- * pfSenseHTMLHead::addMeta()
- *
- * Allows to add a complete HTML &lt;meta /&gt; element to the current
- * meta element array. You can provide an ID if you want to access your
- * particular element at a later time, for example to delete it from the
- * array etc.. If you don't provide an ID, a random ID will be generated
- * and returned.
- * @param string $myMetaElement an HTML string that represents a &lt;meta /&gt; tag.
- * @param string $myID an ID that identifies this element.
- * @return the ID that identifies the particular element that you've just added.
- **/
- function addMeta($myMetaElement = "", $myID = "") {
- if ($myID == "") { $myID = "meta-" . strval(microtime()); }
-
- $this->meta[] = array("meta" => $myMetaElement,
- "ID" => $myID);
-
- return $myID;
- }
-
- /**
- * pfSenseHTMLHead::getMetaArray()
- *
- * @return a reference to the meta element array.
- **/
- function &getMetaArray() {
- return $this->meta;
- }
-
- /**
- * pfSenseHTMLHead::getMetaByID()
- *
- * Returns a reference to an array element that is identified by an ID.
- * Can be used for example to manipulate an array element after it was
- * already stored in the array.
- * @param string $myID an ID that identifies the element that should be retrieved.
- * @return a reference to an array element or NULL if the element does not exist.
- **/
- function &getMetaByID($myID = "") {
- foreach($this->meta as $metael){
- if ($metael["ID"] == $myID) {
- return $metael;
- }
- }
- return NULL;
- }
-
- /**
- * pfSenseHTMLHead::removeMetaByID()
- *
- * Provides a way to delete an element from an HTML element array.
- * You must provide an ID which identifies the element to be deleted.
- * @param string $myID an ID the identifies the element.
- * @return 1 if the element was found or 0 if it does not exist.
- **/
- function removeMetaByID($myID = "") {
- foreach($this->meta as $metael){
- if ($metael["ID"] == $myID) {
- unset($metael);
- return 1;
- }
- }
- return 0;
- }
-
- /**
- * pfSenseHTMLHead::addLink()
- *
- * Allows to add a complete HTML &lt;link /&gt; element to the current
- * link element array. You can provide an ID if you want to access your
- * particular element at a later time, for example to delete it from the
- * array etc.. If you don't provide an ID, a random ID will be generated
- * and returned.
- * @param string $myLinkElement an HTML string that represents a &lt;link /&gt; tag.
- * @param string $myID an ID that identifies this element.
- * @return the ID that identifies the particular element that you've just added.
- **/
- function addLink ($myLinkElement = "", $myID = "") {
- if ($myID == "") { $myID = "link-" . strval(microtime()); }
-
- $this->link[] = array("link" => $myLinkElement,
- "ID" => $myID);
-
- return $myID;
- }
-
- /**
- * pfSenseHTMLHead::getLinkArray()
- *
- * @return a reference to the link element array.
- **/
- function &getLinkArray() {
- return $this->link;
- }
-
- /**
- * pfSenseHTMLHead::getLinkByID()
- *
- * Returns a reference to an array element that is identified by an ID.
- * Can be used for example to manipulate an array element after it was
- * already stored in the array.
- * @param string $myID an ID that identifies the element that should be retrieved.
- * @return a reference to an array element or NULL if the element does not exist.
- **/
- function &getLinkByID($myID = "") {
- foreach($this->link as $linkel){
- if ($linkel["ID"] == $myID) {
- return $linkel;
- }
- }
- return NULL;
- }
-
- /**
- * pfSenseHTMLHead::removeLinkByID()
- *
- * Provides a way to delete an element from an HTML element array.
- * You must provide an ID which identifies the element to be deleted.
- * @param string $myID an ID the identifies the element.
- * @return 1 if the element was found or 0 if it does not exist.
- **/
- function removeLinkByID($myID = "") {
- foreach($this->link as $linkel){
- if ($linkel["ID"] == $myID) {
- unset($linkel);
- return 1;
- }
- }
- return 0;
- }
-
- /**
- * pfSenseHTMLHead::replaceLinkByID()
- *
- * Provides a way to replace an element from an HTML element array.
- * You must provide an ID which identifies the element to be replace.
- * @param string $myID an ID the identifies the element.
- * @return 1 if the element was found or 0 if it does not exist.
- **/
- function replaceLinkByID($myID = "", $byWhat = "") {
- for ($i = 0; $i < count($this->link); $i++) {
- $linkel =& $this->link[$i];
- if ($linkel["ID"] == $myID) {
- $linkel["link"] = $byWhat;
- return 1;
- }
- }
-
- return 0;
- }
-
- /**
- * pfSenseHTMLHead::addScript()
- *
- * Allows to add a complete HTML &lt;link /&gt; element to the current
- * link element array. You can provide an ID if you want to access your
- * particular element at a later time, for example to delete it from the
- * array etc.. If you don't provide an ID, a random ID will be generated
- * and returned.
- *
- * The <code>weight</code> parameter can be used to force the &lt;script /&gt;
- * element to appear at the beginning of the HTML &lt;head /&gt; element or at
- * its end. The greater the value for weight, the later the &lt;script /&gt;
- * element will appear within the HTML &lt;head /&gt; element.
- * @param string $myScriptElement an HTML string that represents a &lt;script /&gt; tag.
- * @param integer $weight allows to position this element within the HTML &lt;head /&gt;
- * @param string $myID an ID that identifies this element.
- * @return the ID that identifies the particular element that you've just added.
- **/
- function addScript($myScriptElement = "", $weight = 1000000, $myID = "") {
- if ($myID == "") { $myID = "script-" . strval(microtime()); }
-
- $this->script[] = array("script" => $myScriptElement,
- "weight" => $weight,
- "ID" => $myID);
- }
-
- /**
- * pfSenseHTMLHead::getScriptArray()
- *
- * @return a reference to the script element array.
- **/
- function &getScriptArray() {
- return $this->script;
- }
-
- /**
- * pfSenseHTMLHead::getScriptByID()
- *
- * Returns a reference to an array element that is identified by an ID.
- * Can be used for example to manipulate an array element after it was
- * already stored in the array.
- * @param string $myID an ID that identifies the element that should be retrieved.
- * @return a reference to an array element or NULL if the element does not exist.
- **/
- function &getScriptByID($myID = "") {
- foreach($this->script as $scriptel){
- if ($scriptel["ID"] == $myID) {
- return $scriptel;
- }
- }
- return NULL;
- }
-
- /**
- * pfSenseHTMLHead::removeScriptByID()
- *
- * Provides a way to delete an element from an HTML element array.
- * You must provide an ID which identifies the element to be deleted.
- * @param string $myID an ID the identifies the element.
- * @return 1 if the element was found or 0 if it does not exist.
- **/
- function removeScriptByID($myID = "") {
- foreach($this->script as $scriptel){
- if ($scriptel["ID"] == $myID) {
- unset($scriptel);
- return 1;
- }
- }
- return 0;
- }
-
- /**
- * pfSenseHTMLHead::getHTML()
- *
- * This function finally renders the HTML string representation of the
- * HTML document header that is represented by this class. If you did
- * specify to not close the HTML &lt;head /&gt; element via <code>closehead</code>
- * you need to close it manually.
- *
- * @return a string that contains a HTML &lt;head /&gt; element.
- **/
- function getHTML () {
- $language = $GLOBALS['config']['system']['language'];
-
- if ($this->returnedHTML) {
- return;
- } else {
- $metastr = "";
- if (is_array($this->meta) && count($this->meta) > 0)
- foreach($this->meta as $metael) {
- $metastr .= $metael["meta"] . "\n";
- }
-
- $linkstr = "";
- if (is_array($this->link) && count($this->link) > 0)
- foreach($this->link as $linkel) {
- $linkstr .= $linkel["link"] . "\n";
- }
-
- $stylestr = "";
- if (is_array($this->style) && count($this->style) > 0)
- foreach($this->style as $styleel) {
- $stylestr .= $styleel["style"] . "\n";
- }
-
- $scriptstr = "";
- usort($this->script, "sortScriptArray");
- if (is_array($this->script) && count($this->script) > 0)
- foreach($this->script as $scriptel) {
-
- $scriptstr .= $scriptel["script"] . "\n";
- }
-
- $this->html = str_replace("%TITLE%", $this->title, $this->html);
- $this->html = str_replace("%META%", $metastr, $this->html);
- $this->html = str_replace("%STYLE%", $stylestr, $this->html);
- $this->html = str_replace("%LINK%", $linkstr, $this->html);
- $this->html = str_replace("%SCRIPT%", $scriptstr, $this->html);
- //$this->html = str_replace("%LANG%", $language, $this->html);
- $this->html = $this->xmlHead . $this->docType . $this->html;
-
- $this->returnedHTML = true;
-
- return $this->closehead ? ($this->html . "</head>") : ($this->html);
- }
- }
-}
-
-/**
- * sortScriptArray()
- *
- * Sorts the script array according of the weight of a particular
- * script element.
- * @param mixed $a
- * @param mixed $b
- * @return
- **/
-function sortScriptArray($a, $b) {
- if ($a["weigth"] == $b["weight"]) {
- return 0;
- }
-
- return (intval($a["weight"]) > intval($b["weight"])) ? 1 : -1;
-}
-
-?>
diff --git a/config/authng/www/php/system_groupmanager.php b/config/authng/www/php/system_groupmanager.php
deleted file mode 100644
index 13259e63..00000000
--- a/config/authng/www/php/system_groupmanager.php
+++ /dev/null
@@ -1,797 +0,0 @@
-<?php
-/*
- $Id$
- part of pfSense (http://www.pfSense.com)
- originally part of part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>.
- All rights reserved.
-
- Copyright (C) 2005 Paul Taylor <paultaylor@winn-dixie.com>.
- All rights reserved.
-
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require("guiconfig.inc");
-
-$_SESSION['NO_AJAX'] = true;
-
-$pgtitle = array(gettext("System"), gettext("Group manager"));
-$treeItemID = 0;
-
-function walkArea($title,
- $t,
- $area,
- $id,
- &$counter,
- &$script_tag,
- $tmpfname,
- &$group) {
- global $treeItemID;
-
- foreach($area as $a => $aa) {
- if (is_array($aa) && count($aa) > 0) {
- $title .= "_{$a}";
- echo "<li class=\"closed\"><a id=\"treeitem_{$treeItemID}\" href=\"#\">$a</a><ul>";
- $treeItemID++;
- walkArea($title,
- $a,
- $aa,
- $id,
- $counter,
- $script_tag,
- $tmpfname,
- $group);
- echo "</ul>\n";
- } else {
- $tmp_string = "{$t}";
- $tmp_string .= ": ";
- $tmp_string .= $a;
- $trimmed_title = trim($title);
- $trimmed_a = trim($a);
- $this_id = "{$trimmed_title}_{$trimmed_a}_{$counter}";
- $this_id = str_replace(" ", "", $this_id);
- $this_id = str_replace("/", "", $this_id);
- $stripped_session = str_replace("/tmp/", "", $tmpfname);
- $allowed = false;
- if (is_array($group['pages'][0]['page'])) {
- foreach($group['pages'][0]['page'] as $page) {
- if (stristr($aa, $page))
- $allowed = true;
- // echo "$page || $aa";
- }
- }
- $allowed ? $checked = " checked=\"checked\"" : $checked = "";
- echo " <li id=\"treeitem_{$treeItemID}\" class=\"closed\" title=\"{$aa}\"><a name=\"anchor_{$treeItemID}\" style=\"display: none;\">&nbsp;</a>";
- $idForOnClick = $treeItemID;
- $treeItemID++;
- echo "<input type=\"checkbox\" class=\"formfld\" id=\"treeitem_{$treeItemID}\" ";
- $treeItemID++;
- echo "name=\"treeitem_{$treeItemID}\" title=\"{$area}\" onClick=\"getURL('system_groupmanager.php?id={$id}&amp;toggle={$aa}&amp;item={$idForOnClick}&amp;session={$stripped_session}', after_request_callback); rotate();\" {$checked} />&nbsp;";
- $treeItemID++;
- echo "<a id=\"treeitem_{$treeItemID}\" href=\"#anchor_{$idForOnClick}\" onclick=\"getURL('system_groupmanager.php?id={$id}&amp;toggle={$aa}&amp;item={$idForOnClick}&amp;session={$stripped_session}', after_request_callback); rotate();\">{$a}</a></li>\n";
- $idForScript = $treeItemID;
- $treeItemID++;
-
-//echo "$script_tag <hr />";
- $script_tag .= "var item = document.getElementById('treeitem_{$idForScript}');\n";
- if ($allowed) {
- $script_tag .= "item.style.backgroundImage = \"url('/tree/page-file_play.gif')\";\n";
- } else {
- $script_tag .= "item.style.backgroundImage = \"url('/tree/page-file_x.gif')\";\n";
- }
- $counter++;
- } // end if
- } // end foreach
-}
-
-function init_ajax_helper_file($tmpfname)
-{
- global $config, $id, $global;
- $a_group = &$config['system']['group'];
- $id = $_GET['id'];
- if (isset($id) && $a_group[$id])
- $group = $a_group[$id];
- else
- $group = array();
- $fd = fopen("/tmp/{$tmpfname}", "w");
- if ($group['pages'][0]['page'])
- foreach($group['pages'][0]['page'] as $page) {
- fwrite($fd, $page . "\n");
- }
- fclose($fd);
- return;
-}
-
-if ($_GET['toggle'] <> "") {
- /* AJAX is calling, lets take care of it */
- if (!file_exists("/tmp/" . $_GET['session'])) {
- init_ajax_helper_file($_GET['session']);
- }
- $fc = file_get_contents("/tmp/" . $_GET['session']);
- $file_split = split("\n", $fc);
- $found = -1;
- for($x = 0; $x < count($file_split); $x++) {
- if ($file_split[$x] == $_GET['toggle']) {
- $found = $x;
- }
- }
- if ($found == -1) {
- $file_split[] = $_GET['toggle'];
- $image = "/tree/page-file_play.gif";
- } else {
- unset($file_split[$found]);
- $image = "/tree/page-file_x.gif";
- }
- $fd = fopen("/tmp/{$_GET['session']}", "w");
- if ($file_split)
- foreach($file_split as $fs) {
- if ($fs)
- fwrite($fd, $fs . "\n");
- }
- fclose($fd);
- echo $_GET['item'] . "_a||" . "{$image}";
- exit;
-}
-
-function convert_array_to_pgtitle($orig)
-{
- $newstring = "";
- foreach($orig as $o) {
- if ($newstring <> "")
- $newstring .= ": ";
- $newstring .= $o;
- }
- return $newstring;
-}
-// Returns an array of pages with their descriptions
-function getAdminPageList()
-{
- global $g;
-
- $tmp = Array();
-
- if ($dir = opendir($g['www_path'])) {
- while ($file = readdir($dir)) {
- // Make sure the file exists and is not a directory
- if ($file == "." or $file == ".." or $file[0] == '.')
- continue;
- // Is this a .inc.php file? pfSense!
- if (fnmatch('guiconfig.inc', $file))
- continue;
- if (fnmatch('*.inc', $file))
- continue;
- if (fnmatch('*.inc.php', $file))
- continue;
- if (fnmatch('*.php', $file)) {
- // Read the description out of the file
- $contents = file_get_contents($file);
- $contents_split = split("\n", $contents);
- $mlinestr = "";
- foreach($contents_split as $contents) {
- $pgtitle = "";
- // Looking for a line like:
- // $pgtitle = array(gettext("System"), gettext("Group manager")); // - DO NOT REMOVE.
- if ($mlinestr == "" && stristr($contents, "\$pgtitle") == false)
- continue;
- if ($mlinestr == "" && stristr($contents, "=") == false)
- continue;
- if (stristr($contents, "<"))
- continue;
- if (stristr($contents, ">"))
- continue;
- /* at this point its evalable */
- $contents = trim ($contents);
- $lastchar = substr($contents, strlen($contents) - 1, strlen($contents));
- $firstchar = substr($contents, 0, 1);
-
- /* check whether pgtitle is on one or multible lines */
- if ($firstchar <> "/" && $firstchar <> "#" && $lastchar <> ";") {
- /* remember the partitial pgtitle string for the next loop iteration */
- $mlinestr .= $contents;
- continue;
- } else if ($mlinestr <> "" && $lastchar == ";") {
- /* this is the final pgtitle part including the semicolon */
- $mlinestr .= $contents;
- } else if ($mlinestr == "" && $lastchar == ";") {
- /* this is a single line pgtitle, hence just
- * copy its contents into mlinestr
- */
- $mlinestr = $contents;
- } else if ($firstchar == "/" || $firstchar == "#") {
- /* same applies for comment lines */
- $mlinestr = $contents;
- }
-
- eval($mlinestr);
-
- /* after eval, if not an array, continue */
- if (!is_array($pgtitle)) {
- /* reset mlinestr for the next loop iteration */
- $mlinestr = "";
- continue;
- }
-
- $tmp[$file] = convert_array_to_pgtitle($pgtitle);
-
- /* break out of the for loop, on to next file */
- break;
- }
- }
- }
-
- /* loop through and read in wizard information */
- if ($dir = opendir("{$g['www_path']}/wizards")) {
- while ($file = readdir($dir)) {
- // Make sure the file exists and is not directory
- if ($file == "." or $file == ".." or $file[0] == '.')
- continue;
- // Is this a .xml file? pfSense!
- if (fnmatch('*.xml', $file)) {
- /* parse package and retrieve the package title */
- $pkg = parse_xml_config_pkg("{$g['www_path']}/wizards/{$file}", "pfsensewizard");
- $title = $pkg['title'];
- if ($title)
- $tmp[$file] = trim($title);
- }
- }
- }
-
- /* loop through and read in package information */
- if ($dir = opendir("{$g['pkg_path']}")) {
- while ($file = readdir($dir)) {
- // Make sure the file exists and is not directory
- if ($file == "." or $file == ".." or $file[0] == '.')
- continue;
- // Is this a .xml file? pfSense!
- if (fnmatch('*.xml', $file)) {
- /* parse package and retrieve the package title */
- $pkg = parse_xml_config_pkg("{$g['pkg_path']}/{$file}", "packagegui");
- $title = $pkg['title'];
- if ($title)
- $tmp[$file] = trim($title);
- }
- }
- }
-
- closedir($dir);
- // Sets Interfaces:Optional page that didn't read in properly with the above method,
- // and pages that don't have descriptions.
- $tmp['interfaces_opt.php'] = ("Interfaces: Optional");
- $tmp['graph.php'] = ("Status: Traffic Graph");
- $tmp['graph_cpu.php'] = ("Diagnostics: CPU Utilization");
- $tmp['exec_raw.php'] = ("Hidden: Exec Raw");
- $tmp['uploadconfig.php'] = ("Hidden: Upload Configuration");
- $tmp['index.php'] = ("Status: System");
- $tmp['system_usermanager.php'] = ("System: User Password");
- $tmp['diag_logs_settings.php'] = ("Diagnostics: Logs: Settings");
- $tmp['diag_logs_vpn.php'] = ("Diagnostics: Logs: PPTP VPN");
- $tmp['diag_logs_filter.php'] = ("Diagnostics: Logs: Firewall");
- $tmp['diag_logs_portal.php'] = ("Diagnostics: Logs: Captive Portal");
- $tmp['diag_logs_dhcp.php'] = ("Diagnostics: Logs: DHCP");
- $tmp['diag_logs.php'] = ("Diagnostics: Logs: System");
-
- $tmp['ifstats.php'] = ("Hidden: *XMLRPC Interface Stats");
- $tmp['license.php'] = ("System: License");
- $tmp['progress.php'] = ("Hidden: *No longer included");
- $tmp['diag_logs_filter_dynamic.php'] = ("Hidden: *No longer included");
- $tmp['preload.php'] = ("Hidden: *XMLRPC Preloader");
- $tmp['xmlrpc.php'] = ("Hidden: *XMLRPC Library");
- $tmp['pkg.php'] = ("System: *Renderer for XML based package GUIs (Part I)");
- $tmp['pkg_edit.php'] = ("System: *Renderer for XML based package GUIs (Part II)");
-
- $tmp['functions.inc.php'] = ("Hidden: Ajax Helper 1");
- $tmp['javascript.inc.php'] = ("Hidden: Ajax Helper 2 ");
- $tmp['sajax.class.php'] = ("Hidden: Ajax Helper 3");
-
- asort($tmp);
-
- return $tmp;
- }
-}
-// Get a list of all admin pages & Descriptions
-$pages = getAdminPageList();
-
-if (!is_array($config['system']['group'])) {
- $config['system']['group'] = array();
-}
-admin_groups_sort();
-$a_group = &$config['system']['group'];
-
-$id = $_GET['id'];
-if (isset($_POST['id']))
- $id = $_POST['id'];
-
-if ($_GET['act'] == "del") {
- if ($a_group[$_GET['id']]) {
- $ok_to_delete = true;
- if (isset($config['system']['user'])) {
- foreach ($config['system']['user'] as $userent) {
- if ($userent['groupname'] == $a_group[$_GET['id']]['name']) {
- $ok_to_delete = false;
- $input_errors[] = gettext("users still exist who are members of this group!");
- break;
- }
- }
- }
- if ($ok_to_delete) {
- unset($a_group[$_GET['id']]);
- write_config();
- pfSenseHeader("system_groupmanager.php");
- exit;
- }
- }
-}
-
-if ($_POST) {
- unset($input_errors);
- $pconfig = $_POST;
- /* input validation */
- $reqdfields = explode(" ", "groupname");
- $reqdfieldsn = explode(",", "Group Name");
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- if (preg_match("/[^a-zA-Z0-9\.\-_ ]/", $_POST['groupname']))
- $input_errors[] = gettext("The group name contains invalid characters.");
-
- if (!$input_errors && !(isset($id) && $a_group[$id])) {
- /* make sure there are no dupes */
- foreach ($a_group as $group) {
- if ($group['name'] == $_POST['groupname']) {
- $input_errors[] = gettext("Another entry with the same group name already exists.");
- break;
- }
- }
- }
-
- if (!$input_errors) {
- if (isset($id) && $a_group[$id])
- $group = $a_group[$id];
-
- $group['name'] = $_POST['groupname'];
- isset($_POST['homepage']) ? $group['home'] = $_POST['homepage'] : $group['home'] = "index.php";
- isset($_POST['gtype']) ? $group['scope'] = $_POST['gtype'] : $group['scope'] = "system";
- $group['description'] = $_POST['description'];
- unset($group['pages'][0]['page']);
-
- $file_split = split("\n", file_get_contents("/tmp/" . $_POST['session']));
- for($x = 0; $x < count($file_split); $x++) {
- if ($file_split[$x])
- $group['pages'][0]['page'][] = $file_split[$x];
- }
-
- if (isset($id) && $a_group[$id])
- $a_group[$id] = $group;
- else
- $a_group[] = $group;
-
- write_config();
-
- unlink_if_exists("/tmp/" . $_GET['session']);
-
- pfSenseHeader("system_groupmanager.php");
- exit;
- }
-}
-
-include("head.inc");
-
-$checkallstr = <<<EOD
- function checkallareas(enable) {
- var elem = document.iform.elements.length;
- var endis = (document.iform.checkall.checked || enable);
-
- for (i = 0; i < elem; i++) {
- if (document.iform.elements[i].name.indexOf("chk-") >= 0) {
- document.iform.elements[i].checked = true;
- document.iform.elements[i].click();
- }
- }
- }
-
-EOD;
-
-$pfSenseHead->addScript("<script type=\"text/javascript\">\n" . $checkallstr . "</script>\n");
-$pfSenseHead->addLink("<link href=\"/tree/tree.css\" rel=\"stylesheet\" type=\"text/css\" />");
-echo $pfSenseHead->getHTML();
-
-?>
-<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
-<?php include("fbegin.inc");?>
-<?php if ($input_errors) print_input_errors($input_errors);?>
-<?php if ($savemsg) print_info_box($savemsg);?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="tabnavtbl">
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
- $tab_array[] = array(gettext("Group"), true, "system_groupmanager.php");
- $tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td class="tabcont">
-<?php
-if ($_GET['act'] == "new" || $_GET['act'] == "edit") {
- $tmpfname = tempnam("/tmp", "edit_add_groupmanager");
- $tmpfname = str_replace("/tmp/", "", $tmpfname);
- unlink("/tmp/$tmpfname");
- init_ajax_helper_file($tmpfname);
- if ($_GET['act'] == "edit") {
- if (isset($id) && $a_group[$id]) {
- $pconfig['name'] = $a_group[$id]['name'];
- $pconfig['description'] = $a_group[$id]['description'];
- $pconfig['home'] = $a_group[$id]['home'];
- $pconfig['gtype'] = $a_group[$id]['scope'];
- $pconfig['pages'] = $a_group[$id]['pages'][0]['page'];
- }
- } else if ($_GET['act'] == "new") {
- /* set this value cause the text field is read only
- * and the user should not be able to mess with this
- * setting.
- */
- $pconfig['gtype'] = "user";
- }
-
-?>
- <form action="system_groupmanager.php" method="post" name="iform" id="iform">
- <div id="inputerrors"></div>
-<script type="text/javascript">
-if (typeof getURL == 'undefined') {
- getURL = function(url, callback) {
- if (!url)
- throw 'No URL for getURL';
- try {
- if (typeof callback.operationComplete == 'function')
- callback = callback.operationComplete;
- } catch (e) {}
- if (typeof callback != 'function')
- throw 'No callback function for getURL';
- var http_request = null;
- if (typeof XMLHttpRequest != 'undefined') {
- http_request = new XMLHttpRequest();
- }
- else if (typeof ActiveXObject != 'undefined') {
- try {
- http_request = new ActiveXObject('Msxml2.XMLHTTP');
- } catch (e) {
- try {
- http_request = new ActiveXObject('Microsoft.XMLHTTP');
- } catch (e) {}
- }
- }
- if (!http_request)
- throw 'Both getURL and XMLHttpRequest are undefined';
- http_request.onreadystatechange = function() {
- if (http_request.readyState == 4) {
- callback( { success : true,
- content : http_request.responseText,
- contentType : http_request.getResponseHeader("Content-Type") } );
- }
- }
- http_request.open('GET', url, true);
- http_request.send(null);
- }
-}
-function after_request_callback(callback_data) {
- var data = callback_data.content;
- data_split = data.split("||");
- var item = document.getElementById(data_split[0]);
- var check = document.getElementById("chk-" + data_split[0]);
- item.style.backgroundImage = 'url(' + data_split[1] + ')';
- if (data_split[1] == "/tree/page-file_play.gif") {
- check.checked = true;
- } else {
- check.checked = false;
- }
- $('troot_text').innerHTML = '<?= gettext("webConfigurator"); ?>';
-}
-
-function rotate() {
- $('troot_text').innerHTML = '<img src="/themes/<?= $g['theme'] ?>/images/misc/loader.gif" alt="" />';
-}
-</script>
-
- <input type="hidden" name="session" value="<?=$tmpfname?>" />
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="22%" valign="top" class="vncellreq">
- <?=gettext("Group name");?>
- </td>
- <td width="78%" class="vtable">
- <input name="groupname" type="text" class="formfld group" id="groupname" size="20" value="<?=htmlspecialchars($pconfig['name']);?>" />
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell">
- <?=gettext("Home Page");?>
- </td>
- <td width="78%" class="vtable">
- <input name="homepage" type="text" class="formfld url" id="homepage" size="20" value="<?=htmlspecialchars($pconfig['home']);?>" />
- <br />
- <?=gettext("A webpage that should be shown to the user after having logged in.");?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">
- <?=gettext("Group Type");?>
- </td>
- <td width="78%" class="vtable">
- <input name="gtype" type="text" class="formfld unknown" id="gtype" size="20" value="<?=htmlspecialchars($pconfig['gtype']);?>" readonly="readonly" />
- <br />
- <?=gettext("Indicates whether this is a system (aka non-deletable) group or a group created by the user.");?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
- <td width="78%" class="vtable">
- <textarea name="description" class="formpre" id="description" rows="2" cols="20"><?=htmlspecialchars($pconfig['description']);?></textarea>
- <br />
- <?=gettext("Group description, for your own information only");?>
- </td>
- </tr>
- <tr>
- <td colspan="5">
- <script type="text/javascript" src="/tree/tree.js"></script>
-<?php
- if (isset($id) && $a_group[$id])
- $group = $a_group[$id];
- else
- $group = array();
- $menu_array = array();
- /* build up an array similar to fbegin.inc's $menu */
- foreach ($pages as $fname => $title) {
- $identifier = str_replace('.php', '', $fname);
- $identifier = $fname;
- $title_split = split(": ", $title);
- $tmp = "\$menu_array";
- foreach($title_split as $ts)
- $tmp .= "['{$ts}']";
- $tmp .= " = \"{$identifier}\";";
- echo "<!-- $tmp -->\n";
- eval($tmp);
- }
-
- echo "<span id=\"troot_text\" style=\"position: relative; top: 12px;\">" . gettext("webConfigurator") . "</span><ul class=\"tree\" id=\"troot\">\n";
- $counter = 0;
- /* XXX: we may wanna pull from or add to each row a +e item (+edit) */
- $script_tag = "";
-
- if (is_array($menu_array) && count($menu_array) > 0) {
- foreach($menu_array as $title => $m) {
- echo "<li class=\"closed\"><a id=\"treeitem_{$treeItemID}\" href=\"#\">$title</a><ul>";
- $treeItemID++;
- if (is_array($m) && count($m) > 0) {
- foreach($m as $t => $area) {
- if (is_array($area) && count($area) > 0) {
- echo "<li class=\"closed\"><a id=\"treeitem_{$treeItemID}\" href=\"#\">$t</a><ul>";
- $treeItemID++;
- walkArea("{$title}_{$t}",
- $t,
- $area,
- $id,
- $counter,
- $script_tag,
- $tmpfname,
- $group);
- echo "</ul>\n";
- } else {
- $trimmed_title = trim($title);
- $trimmed_t = trim($t);
- $this_id = "{$trimmed_title}_{$trimmed_t}_{$counter}";
- $this_id = str_replace(" ", "", $this_id);
- $this_id = str_replace("/", "", $this_id);
- $allowed = false;
- if (is_array($group['pages'][0]['page'])) {
- foreach($group['pages'][0]['page'] as $page) {
- if (stristr($area, $page))
- $allowed = true;
- // echo "$page || $area || $t";
- }
- }
- $allowed ? $checked = " checked=\"checked\"" : $checked = "";
- $stripped_session = str_replace("/tmp/", "", $tmpfname);
- echo"<li id=\"treeitem_{$treeItemID}\" class=\"closed\" title=\"{$area}\"><a name=\"anchor_{$treeItemID}\" style=\"display: none;\">&nbsp;</a>";
- $idForOnClick = $treeItemID;
- $treeItemID++;
- echo " <input type=\"checkbox\" class=\"formfld\" id=\"treeitem_{$treeItemID}\" ";
- $treeItemID++;
- echo "name=\"treeitem_{$treeItemID}\" title=\"{$area}\" onclick=\"getURL('system_groupmanager.php?id={$id}&amp;toggle={$area}&amp;item={$idForOnClick}&amp;session={$stripped_session}', after_request_callback); rotate();\" {$checked}/>&nbsp;";
- echo " <a id=\"treeitem_{$treeItemID}\" ";
- $idForScript = $treeItemID;
- $treeItemID++;
- echo "href=\"#anchor_{$idForOnClick}\" onclick=\"getURL('system_groupmanager.php?id={$id}&amp;toggle={$area}&amp;item={$idForOnClick}&amp;session={$stripped_session}', after_request_callback); rotate();\">{$t}</a></li>\n";
- $treeItemID++;
- $script_tag .= "var item = document.getElementById('treeitem_{$idForScript}');\n";
- if ($allowed) {
- $script_tag .= "item.style.backgroundImage = \"url('/tree/page-file_play.gif')\";\n";
- } else {
- $script_tag .= "item.style.backgroundImage = \"url('/tree/page-file_x.gif')\";\n";
- }
- $counter++;
- }
- }
- }
- echo "</ul>\n";
- }
- }
- echo "</ul>\n";
-
-?>
- </td>
- </tr>
- <tr>
- <td colspan="5">
- <table>
- <tr>
- <td><input type="checkbox" name="checkall" id="checkall" title="Check/Uncheck all areas" onclick="checkallareas();"/></td>
- <td><?=gettext("Check/Uncheck all areas");?></td>
- </tr>
- <tr>
- <td><img src="/tree/page-file_play.gif" alt="" /></td>
- <td><?=gettext("Allowed access to area");?></td>
- </tr>
- <tr>
- <td><img src="/tree/page-file_x.gif" alt="" /></td>
- <td><?=gettext("Disallowed access to area");?></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="5">
- <?=gettext("Select that pages that this group may access. Members of this group will be able to perform all actions that are possible from each individual web page. Ensure you set access levels appropriately.");?>
- </td>
- </tr>
- <tr>
- <td colspan="5">
- <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
- <?php if (isset($id) && $a_group[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>" />
- <?php endif;?>
- <p>
- <span class="vexpl">
- <span class="red">
- <strong><?=gettext("Note");?>: </strong>
- </span>
- <?=gettext("Pages marked with an * are strongly recommended for every group.");?>
- </span>
- </p>
- </td>
- </tr>
- </table>
- </form>
- </td> <!-- end <td class="tabcont"/> -->
- </tr>
- </table>
-<?php
-} else {
-
-?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="35%" class="listhdrr"><?=gettext("Group name");?></td>
- <td width="20%" class="listhdrr"><?=gettext("Description");?></td>
- <td width="20%" class="listhdrr"><?=gettext("Pages Accessible");?></td>
- <td width="10%" class="list"></td>
- </tr>
-<?php
- $i = 0;
- foreach($a_group as $group):
-?>
- <tr>
- <td class="listlr" valign="middle" nowrap="nowrap">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="left" valign="middle">
- <?php if($group['scope'] == "user"): ?>
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_system-group.png" alt="Group" title="Group" border="0" height="20" width="20" />
- <?php else: ?>
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_system-group-grey.png" alt="Group" title="Group" border="0" height="20" width="20" />
- <?php endif; ?>
- &nbsp;
- </td>
- <td align="left" valign="middle">
- <?
- if($group['name'] != "")
- echo htmlspecialchars($group['name']);
- else
- echo "&nbsp";
- ?>
- </td>
- </tr>
- </table>
- </td>
- <td class="listr">
- <?
- if($group['description'] != "")
- echo htmlspecialchars($group['description']);
- else
- echo "&nbsp;";
- ?>
- </td>
- <td class="listbg">
- <?php if(is_array($group['pages'][0])): ?>
- <font color="white"><?=count($group['pages'][0]['page']);?></font>
- <?php elseif (isset($group['pages'][0])): ?>
- <font color="white"><?=$group['pages'][0];?></font>
- <?php else: ?>
- <font color="white"><?=gettext("NOT SET");?></font>
- <?php endif; ?>
- </td>
- <?php if($group['scope'] == "user"): ?>
- <td valign="middle" nowrap class="list">
- <a href="system_groupmanager.php?act=edit&amp;id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0" alt="" />
- </a>
- <a href="system_groupmanager.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group?");?>')">
- <img src="./themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete group");?>" width="17" height="17" border="0" alt="" />
- </a>
- </td>
- <?php endif; ?>
- </tr>
-<?php
- $i++;
- endforeach;
-?>
- <tr>
- <td class="list" colspan="3"></td>
- <td class="list">
- <a href="system_groupmanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add group");?>" width="17" height="17" border="0" alt="" />
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>
- <?=gettext("Additional webConfigurator admin groups can be added here. Each group can be restricted to specific portions of the webConfigurator. Individually select the desired web pages each group may access. For example, a troubleshooting group could be created which has access only to selected Status and Diagnostics pages.");?>
- </p>
- <p>
- <?=gettext("A group icon that appears grey indicates that it is a system group and thus can't be modified or deleted.");?>
- </p>
- </td>
- </tr>
- </table>
-</td></tr>
-</table>
-<?php
-}
-?>
-
-<script type="text/javascript">
- window.setTimeout('afterload()', '10');
- function afterload() {
- <?php echo $script_tag ?>
- }
-</script>
-<?php include("fend.inc");?>
-</body>
-</html>
diff --git a/config/authng/www/php/system_usermanager.php b/config/authng/www/php/system_usermanager.php
deleted file mode 100644
index 0a13be95..00000000
--- a/config/authng/www/php/system_usermanager.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- system_usermanager.php
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-
-require("guiconfig.inc");
-// The page title for non-admins
-$pgtitle = getUsermanagerPagetitle();
-
-include("head.inc");
-
-$effectStyle = '
- <style type="text/css">
- .popup_nousers {
- background: #000000;
- opacity: 0.2;
- }
- </style>
-';
-foreach(getWindowJSScriptRefs() as $jscript){
- $pfSenseHead->addScript($jscript);
-}
-foreach(getWindowJSStyleRefs() as $style){
- $pfSenseHead->addStyle($style);
-}
-$pfSenseHead->addStyle($effectStyle);
-echo $pfSenseHead->getHTML();
-?>
-<body link="#000000" vlink="#000000" alink="#000000">
-<?php include("fbegin.inc");?>
-<p class="pgtitle"><?= gentitle($pgtitle); ?></p>
-<form action="system_usermanager.php" method="post" name="iform" id="iform">
-<?php if ($input_errors) print_input_errors($input_errors);?>
-<?php if ($savemsg) print_info_box($savemsg);?>
-<?php
- if (! gotNoUsers()) {
- if ($userPeer->isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) {
- processUserManagerAdminPostVars();
- require_once("system_usermanager_admin.inc");
- } else {
- processUserManagerPostVars();
- require_once("system_usermanager_user.inc");
- }
- }
-?>
-</form>
-<div id="popupanchor">&#160;</div>
-<?= openNoUserDefsDialog("popup_nousers"); ?>
-<?php include("fend.inc");?>
-</body>
-</html>
diff --git a/config/authng/www/php/system_usermanager_admin.inc b/config/authng/www/php/system_usermanager_admin.inc
deleted file mode 100644
index 73cda74f..00000000
--- a/config/authng/www/php/system_usermanager_admin.inc
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- system_usermanager_admin.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-/* ======================= P A G E F R A G M E N T ======================== */
-/* ========================================================================== */
-?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("Users"), true, "system_usermanager.php");
- $tab_array[] = array(gettext("Group"), false, "system_groupmanager.php");
- $tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td>
- <?php
- if ($_GET['act'] == "new" || $_GET['act'] == "edit" || $input_errors) {
- if ($_GET['act'] == "edit") {
- if (isset($id) && $a_user[$id]) {
- $pconfig['usernamefld'] = $a_user[$id]['name'];
- $pconfig['fullname'] = $a_user[$id]['fullname'];
- $pconfig['groupname'] = $a_user[$id]['groupname'];
- $pconfig['utype'] = $a_user[$id]['scope'];
- $pconfig['authorizedkeys'] = base64_decode($a_user[$id]['authorizedkeys']);
- }
- } else if ($_GET['act'] == "new") {
- /* set this value cause the text field is read only
- * and the user should not be able to mess with this
- * setting.
- */
- $pconfig['utype'] = "user";
- }
-
- // finally pull in the php file containing the appropriate markup
- require_once("system_usermanager_admin_newedit.inc");
- ?>
- <?php
- } else {
- // finally pull in the php file containing the appropriate markup
- require_once("system_usermanager_admin_index.inc");
- ?>
- <?php } ?>
- </td>
- </tr>
- </table>
- </div> <!-- MAINAREA DIV -->
- </td>
- </tr>
- </table>
diff --git a/config/authng/www/php/system_usermanager_admin_index.inc b/config/authng/www/php/system_usermanager_admin_index.inc
deleted file mode 100644
index 807c7e53..00000000
--- a/config/authng/www/php/system_usermanager_admin_index.inc
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- system_usermanager_admin_edituser.php
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-/* ======================= P A G E F R A G M E N T ======================== */
-/* ========================================================================== */
-?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
- <td width="35%" class="listhdrr">Username</td>
- <td width="20%" class="listhdrr">Full name</td>
- <td width="20%" class="listhdrr">Group</td>
- <td width="10%" class="list"></td>
-</tr>
-<?php
- $i = 0;
- foreach($a_user as $userent):
-?>
-<tr ondblclick="document.location.herf = 'system_usermanager.php?act=edit&id=<?=$i;?>';">
- <td class="listlr">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="left" valign="middle">
- <?php if($userent['scope'] == "user"): ?>
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_system-user.png" alt="User" title="User" border="0" height="20" width="20" />
- <?php else: ?>
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_system-user-grey.png" alt="User" title="User" border="0" height="20" width="20" />
- <?php endif; ?>
- &nbsp;
- </td>
- <td align="left" valign="middle">
- <?=htmlspecialchars($userent['name']);?>
- </td>
- </tr>
- </table>
- </td>
- <td class="listr"><?=htmlspecialchars($userent['fullname']);?>&nbsp;</td>
- <td class="listbg">
- <font color="white"><?=htmlspecialchars($userent['groupname']);?></font>&nbsp;
- </td>
- <td valign="middle" nowrap class="list">
- <a href="system_usermanager.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="edit user" alt="edit user" width="17" height="17" border="0" />
- </a>
- <?php if($userent['scope'] == "user"): ?>
- &nbsp;
- <a href="system_usermanager.php?act=del&what=user&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this User?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="delete user" alt="delete user" width="17" height="17" border="0" />
- </a>
- <?php endif; ?>
- </td>
-</tr>
-<?php
- $i++;
- endforeach;
-?>
-<tr>
- <td class="list" colspan="3"></td>
- <td class="list">
- <a href="system_usermanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add user" alt="add user" width="17" height="17" border="0" />
- </a>
- </td>
-</tr>
-<tr>
- <td colspan="3">
- <p>
- <?=gettext("Additional webConfigurator users can be added here. User permissions are determined by the admin group they are a member of.");?>
- </p>
- <p>
- <?=gettext("An user icon that appears grey indicates that it is a system user and thus it's only possible to modified a subset of the regular user data. Additionally such an user can't be deleted.");?>
- </p>
- </td>
-</tr>
-</table> \ No newline at end of file
diff --git a/config/authng/www/php/system_usermanager_admin_newedit.inc b/config/authng/www/php/system_usermanager_admin_newedit.inc
deleted file mode 100644
index d5b7126d..00000000
--- a/config/authng/www/php/system_usermanager_admin_newedit.inc
+++ /dev/null
@@ -1,167 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- system_usermanager_admin_newuser.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-/* ======================= P A G E F R A G M E N T ======================== */
-/* ========================================================================== */
-?>
-
-<div id="inputerrors"></div>
-<table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
- <td width="78%" class="vtable">
- <input name="usernamefld" type="text" class="formfld user" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" <?php if ($pconfig['utype'] == "system") { echo "readonly=\"readonly\" "; }?>/>
- <input name="oldusername" type="hidden" id="oldusername" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" />
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq" rowspan="2"><?=gettext("Password");?></td>
- <td width="78%" class="vtable">
- <input name="passwordfld1" type="password" class="formfld pwd" id="passwordfld1" size="20" value="" />
- </td>
- </tr>
- <tr>
- <td width="78%" class="vtable">
- <input name="passwordfld2" type="password" class="formfld pwd" id="passwordfld2" size="20" value="" />&nbsp;<?= gettext("(confirmation)"); ?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Full name");?></td>
- <td width="78%" class="vtable">
- <input name="fullname" type="text" class="formfld unknown" id="fullname" size="20" value="<?=htmlspecialchars($pconfig['fullname']);?>" <?php if ($pconfig['utype'] == "system") { echo "readonly=\"readonly\" "; }?>/>
- <br />
- <?=gettext("User's full name, for your own information only");?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("User type");?></td>
- <td width="78%" class="vtable">
- <input name="utype" type="text" class="formfld unknown" id="utype" size="20" value="<?=htmlspecialchars($pconfig['utype']);?>" readonly="readonly" />
- <br />
- <?=gettext("Indicates whether this is a system (aka non-deletable) user or a user created by a particular user.");?>
- </td>
- </tr>
- <?php if (isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])): ?>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("User Privileges");?></td>
- <td width="78%" class="vtable">
- <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="5%" class="listhdrr"><?=gettext("ID");?></td>
- <td width="30%" class="listhdrr"><?=gettext("Name");?></td>
- <td width="40%" class="listhdrr"><?=gettext("Description");?></td>
- <td width="5%" class="list"></td>
- </tr>
-
- <?php if(is_array($t_privs)): ?>
- <?php $i = 0; foreach ($t_privs as $priv): ?>
- <?php if($priv['id'] <> ""): ?>
- <tr>
- <td class="listlr" <?php if($a_user[$id]['scope'] == "user") echo "ondblclick=\"document.location='system_usermanager_edit.php?id={$i}&userid={$id}&useract={$_GET['act']}';\""; ?>>
- <?=htmlspecialchars($priv['id']);?>
- </td>
- <td class="listlr" <?php if($a_user[$id]['scope'] == "user") echo "ondblclick=\"document.location='system_usermanager_edit.php?id={$i}&userid={$id}&useract={$_GET['act']}';\""; ?>>
- <?=htmlspecialchars($priv['name']);?>
- </td>
- <td class="listbg" <?php if($a_user[$id]['scope'] == "user") echo "ondblclick=\"document.location='system_usermanager_edit?id={$i}&userid={$id}&useract={$_GET['act']}';\""; ?>>
- <font color="#FFFFFF"><?=htmlspecialchars($priv['descr']);?>&nbsp;</font>
- </td>
- <td valign="middle" nowrap class="list">
- <?php if($a_user[$id]['scope'] == "user"): ?>
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td valign="middle"><a href="system_usermanager_edit.php?id=<?=$i;?>&userid=<?= $id ?>&useract=<?= $_GET['act'] ?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="" /></a></td>
- <td valign="middle"><a href="system_usermanager.php?act=del&privid=<?=$i;?>&what=priv&id=<?= $id ?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="" /></a></td>
- </tr>
- </table>
- <?php endif; ?>
- </td>
- </tr>
- <?php endif; ?>
- <?php $i++; endforeach; ?>
- <?php endif; ?>
-
- <?php if($a_user[$id]['scope'] == "user"): ?>
- <tr>
- <td class="list" colspan="3"></td>
- <td class="list">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td valign="middle"><a href="system_usermanager_edit.php?userid=<?= $id ?>&useract=<?= $_GET['act'] ?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="" /></a></td>
- </tr>
- </table>
- </td>
- </tr>
- <?php endif; ?>
- </table>
- </td>
- </tr>
- <?php endif; ?>
- <?php if (isset($config['system']['ssh']['sshdkeyonly'])): ?>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Authorized keys");?></td>
- <td width="78%" class="vtable">
- <textarea name="authorizedkeys" cols="65" rows="7" id="authorizedkeys" class="formfld_cert" wrap="off"><?=htmlspecialchars($pconfig['authorizedkeys']);?></textarea>
- <br />
- <?=gettext("Paste an authorized keys file here.");?>
- </td>
- </tr>
- <?php endif; ?>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Group Name");?></td>
- <td width="78%" class="vtable">
- <select name="groupname" class="formselect" id="groupname" <?php if ($pconfig['utype'] == "system") { echo "disabled=\"disabled\" "; } ?>>
- <?php foreach ($config['system']['group'] as $group): ?>
- <option value="<?=$group['name'];?>" <?php if ($group['name'] == $pconfig['groupname']) { echo "selected"; } ?>>
- <?=htmlspecialchars($group['name']);?>
- </option>
- <?php endforeach;?>
- </select>
- <br />
- <?=gettext("The admin group to which this user is assigned.");?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
- <?php if (isset($id) && $a_user[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>" />
- <?php endif;?>
- </td>
- </tr>
-</table>
diff --git a/config/authng/www/php/system_usermanager_edit.php b/config/authng/www/php/system_usermanager_edit.php
deleted file mode 100644
index 25dc2ac3..00000000
--- a/config/authng/www/php/system_usermanager_edit.php
+++ /dev/null
@@ -1,294 +0,0 @@
-<?php
-/* $Id$ */
-/*
- system_usermanager_edit.php
-
- Copyright (C) 2006 Daniel S. Haischt.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-$pgtitle = array(gettext("System"),
- gettext("User manager"),
- gettext("Edit Privilege"));
-
-require("guiconfig.inc");
-
-/*
- The following code presumes, that the following XML structure exists or
- if it does not exist, it will be created.
-
- <priv>
- <id>fooid</id>
- <name>foo</name>
- <descr>foo desc</descr>
- </priv>
- <priv>
- <id>barid</id>
- <name>bar</name>
- <descr>bar desc</descr>
- </priv>
-*/
-
-$useract = $_GET['useract'];
-if (isset($_POST['useract']))
- $useract = $_POST['useract'];
-
-/* USERID must be set no matter whether this is a new entry or an existing entry */
-$userid = $_GET['userid'];
-if (isset($_POST['userid']))
- $userid = $_POST['userid'];
-
-/* ID is only set if the user wants to edit an existing entry */
-$id = $_GET['id'];
-if (isset($_POST['id']))
- $id = $_POST['id'];
-
-if (empty($config['system']['user'][$userid])) {
- pfSenseHeader("system_usermanager.php?id={$userid}&act={$_GET['useract']}");
- exit;
-}
-
-if (!is_array($config['system']['user'][$userid]['priv'])) {
- $config['system']['user'][$userid]['priv'] = array();
-}
-
-$t_privs = &$config['system']['user'][$userid]['priv'];
-
-if (isset($id) && $t_privs[$id]) {
- $pconfig['pid'] = $t_privs[$id]['id'];
- $pconfig['pname'] = $t_privs[$id]['name'];
- $pconfig['descr'] = $t_privs[$id]['descr'];
-} else {
- $pconfig['pid'] = $_GET['pid'];
- $pconfig['pname'] = $_GET['pname'];
- $pconfig['descr'] = $_GET['descr'];
-}
-
-if ($_POST) {
-
- unset($input_errors);
- $pconfig = $_POST;
-
- /* input validation */
- $reqdfields = explode(" ", "pid pname");
- $reqdfieldsn = explode(",", "ID, Privilege Name");
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- /* check for overlaps */
- foreach ($t_privs as $priv) {
- if (isset($id) && ($t_privs[$id]) && ($t_privs[$id] === $priv)) {
- continue;
- }
- if ($priv['id'] == $pconfig['pid']) {
- $input_errors[] = gettext("This privilege ID already exists.");
- break;
- }
- }
-
- if (hasShellAccess($userindex[$userid]['name']) ||
- isAllowedToCopyFiles($userindex[$userid]['name'])) {
- if (preg_match("/[^a-zA-Z0-9\.\-_]/", $userindex[$userid]['name']))
- $input_errors[] = gettext("The username contains invalid characters " .
- "((this means this user can't be used to create" .
- " a shell account).");
- }
-
- /* if this is an AJAX caller then handle via JSON */
- if(isAjax() && is_array($input_errors)) {
- input_errors2Ajax($input_errors);
- exit;
- }
-
- if (!$input_errors) {
- $priv = array();
- $priv['id'] = $pconfig['pid'];
- $priv['name'] = $pconfig['pname'];
- $priv['descr'] = $pconfig['descr'];
-
- if (isset($id) && $t_privs[$id])
- $t_privs[$id] = $priv;
- else
- $t_privs[] = $priv;
-
- if ($priv['id'] == "hasshell") {
- assignUID($user['name']);
- assignGID($user['groupname']);
- }
-
- write_config();
-
- $retval = 0;
- config_lock();
- config_unlock();
-
- $savemsg = get_std_save_message($retval);
-
- pfSenseHeader("system_usermanager.php?id={$userid}&act={$useract}");
- exit;
- }
-}
-
-/* if ajax is calling, give them an update message */
-if(isAjax())
- print_info_box_np($savemsg);
-
-include("head.inc");
-/* put your custom HTML head content here */
-/* using some of the $pfSenseHead function calls */
-
-$jscriptstr = <<<EOD
-<script type="text/javascript">
-<!--
-
- var privs = new Array();
-
-
-EOD;
-
-$privs =& getSystemPrivs();
-
-if (is_array($privs)) {
- $id = 0;
-
- $jscriptstr .= "privs[{$id}] = new Object();\n";
- $jscriptstr .= "privs[{$id}]['id'] = 'custom';\n";
- $jscriptstr .= "privs[{$id}]['name'] = '*** Custom privilege ***';\n";
- $jscriptstr .= "privs[{$id}]['desc'] = 'This is your own, user defined privilege that you may change according to your requirements.';\n";
- $id++;
-
- foreach($privs as $priv){
- $jscriptstr .= "privs[{$id}] = new Object();\n";
- $jscriptstr .= "privs[{$id}]['id'] = '{$priv['id']}';\n";
- $jscriptstr .= "privs[{$id}]['name'] = '{$priv['name']}';\n";
- $jscriptstr .= "privs[{$id}]['desc'] = '{$priv['desc']}';\n";
- $id++;
- }
-}
-
-$jscriptstr .= <<<EOD
- function setTextFields() {
- var idx = document.iform.sysprivs.selectedIndex;
- var value = document.iform.sysprivs.options[idx].value;
-
- for (var i = 0; i < privs.length; i++) {
- if (privs[i]['id'] == value && privs[i]['id'] != 'custom') {
- document.iform.pid.value = privs[i]['id'];
- document.iform.pid.readOnly = true;
- document.iform.pname.value = privs[i]['name'];
- document.iform.pname.readOnly = true;
- document.iform.descr.value = privs[i]['desc'];
- document.iform.descr.readOnly = true;
- break;
- } else if (privs[i]['id'] == value) {
- document.iform.pid.value = privs[i]['id'];
- document.iform.pid.readOnly = false;
- document.iform.pname.value = privs[i]['name'];
- document.iform.pname.readOnly = false;
- document.iform.descr.value = privs[i]['desc'];
- document.iform.descr.readOnly = false;
- break;
- }
- }
- }
-
-//-->
-</script>
-
-EOD;
-
-$pfSenseHead->addScript($jscriptstr);
-echo $pfSenseHead->getHTML();
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?= $jsevents["body"]["onload"] ?>">
-<?php include("fbegin.inc"); ?>
-<?php if ($input_errors) print_input_errors($input_errors); ?>
-<?php if ($savemsg) print_info_box($savemsg); ?>
- <form action="system_usermanager_edit.php" method="post" name="iform" id="iform">
- <div id="inputerrors"></div>
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("System Privileges");?></td>
- <td width="78%" class="vtable">
- <select name="sysprivs" id="sysprivs" class="formselect" onchange="setTextFields();">
- <option value="custom">*** Custom privilege ***</option>
- <?php
- $privs =& getSystemPrivs();
-
- if (is_array($privs)) {
- foreach($privs as $priv){
- if (isset($config['system']['ssh']['sshdkeyonly']) && $priv['name'] <> "copyfiles")
- echo "<option value=\"{$priv['id']}\">${priv['name']}</option>";
- else if (empty($config['system']['ssh']['sshdkeyonly']))
- echo "<option value=\"{$priv['id']}\">${priv['name']}</option>";
- }
- }
- ?>
- </select><br />
- (If you do not want to define your own privilege, you may
- select one from this list)
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Privilege Identifier");?></td>
- <td width="78%" class="vtable">
- <input name="pid" type="text" class="formfld unknown" id="pid" size="30" value="<?=htmlspecialchars($pconfig['pid']);?>" />
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Privilege Name");?></td>
- <td width="78%" class="vtable">
- <input name="pname" type="text" class="formfld unknown" id="pname" size="30" value="<?=htmlspecialchars($pconfig['pname']);?>" />
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
- <td width="78%" class="vtable">
- <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
- <br /> <span class="vexpl"><?=gettext("You may enter a description here
- for your reference (not parsed).");?></span></td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input id="submitt" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
- <input id="cancelbutton" class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" />
- <?php if (isset($id) && $t_privs[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>" />
- <?php endif; ?>
- <?php if (isset($userid)): ?>
- <input name="userid" type="hidden" value="<?=$userid;?>" />
- <?php endif; ?>
- <?php if (isset($useract)): ?>
- <input name="useract" type="hidden" value="<?=$useract;?>" />
- <?php endif; ?>
- </td>
- </tr>
- </table>
- </form>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/config/authng/www/php/system_usermanager_settings.php b/config/authng/www/php/system_usermanager_settings.php
deleted file mode 100755
index 5853fab4..00000000
--- a/config/authng/www/php/system_usermanager_settings.php
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-/* $Id$ */
-/*
- part of pfSense (http://www.pfsense.org/)
-
- Copyright (C) 2007 Bill Marquette <bill.marquette@gmail.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-require("guiconfig.inc");
-
-$pconfig['session_timeout'] = &$config['system']['webgui']['session_timeout'];
-
-// Page title for main admin
-$pgtitle = array(gettext("System"), gettext("User manager settings"));
-
-if ($_POST) {
- unset($input_errors);
-
- /* input validation */
- $reqdfields = explode(" ", "session_timeout");
- $reqdfieldsn = explode(",", "Session Timeout");
-
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
- if ($_POST['session_timeout'] != "" && !is_numeric($_POST['session_timeout']))
- $input_errors[] = gettext("Session timeout must be an integer with value 0 or greater.");
-
- /* if this is an AJAX caller then handle via JSON */
- if (isAjax() && is_array($input_errors)) {
- input_errors2Ajax($input_errors);
- exit;
- }
-
-
- if (!$input_errors) {
- $pconfig['session_timeout'] = $_POST['session_timeout'];
-
- write_config();
- pfSenseHeader("system_usermanager_settings.php");
- }
-}
-
-include("head.inc");
-echo $pfSenseHead->getHTML();
-?>
-
-<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
-<?php include("fbegin.inc");?>
-<?php if ($input_errors) print_input_errors($input_errors);?>
-<?php if ($savemsg) print_info_box($savemsg);?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="tabnavtbl">
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
- $tab_array[] = array(gettext("Group"), false, "system_groupmanager.php");
- $tab_array[] = array(gettext("Settings"), true, "system_usermanager_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- <tr>
- <td>
- <div id="mainarea">
- <form id="iform" name="iform" action="system_usermanager_settings.php" method="post">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="22%" valign="top" class="vncell">Session Timeout</td>
- <td width="78%" class="vtable"> <input name="session_timeout" id="session_timeout" type="text"size="20" class="formfld unknown" value="<?=htmlspecialchars($pconfig['session_timeout']);?>" />
- <br />
- <?=gettext("Time in minutes to expire idle management sessions.");?><br />
- </td>
- </tr>
-
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%"> <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
- </td>
- </tr>
- </table>
- </form>
- </div>
- </td>
- </tr>
- </table>
-
-<?php include("fend.inc");?>
-</body>
-</html>
diff --git a/config/authng/www/php/system_usermanager_user.inc b/config/authng/www/php/system_usermanager_user.inc
deleted file mode 100644
index 25d2e210..00000000
--- a/config/authng/www/php/system_usermanager_user.inc
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/* $Id$ */
-/* ========================================================================== */
-/*
- system_usermanager_user.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-/* ======================= P A G E F R A G M E N T ======================== */
-/* ========================================================================== */
-?>
- <div id="inputerrors"></div>
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td colspan="2" valign="top" class="listtopic"><?=$HTTP_SERVER_VARS['AUTH_USER']?>'s Password</td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell" rowspan="2">Password</td>
- <td width="78%" class="vtable">
- <input name="passwordfld1" type="password" class="formfld pwd" id="passwordfld1" size="20" />
- </td>
- </tr>
- <tr>
- <td width="78%" class="vtable">
- <input name="passwordfld2" type="password" class="formfld pwd" id="passwordfld2" size="20" />
- &nbsp;<?=gettext("(confirmation)");?>
- <br />
- <span class="vexpl"><?=gettext("Select a new password");?></span>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
- </td>
- </tr>
- </table>
diff --git a/config/authng/www/wizards/authng_wizard.xml b/config/authng/www/wizards/authng_wizard.xml
deleted file mode 100644
index 94796e2f..00000000
--- a/config/authng/www/wizards/authng_wizard.xml
+++ /dev/null
@@ -1,496 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<pfsensewizard>
-<copyright>
-/* $Id$ */
-/* ========================================================================== */
-/*
- authng_wizard.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
- All rights reserved.
-
- Based on m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
-</copyright>
-<totalsteps>8</totalsteps>
-<step>
- <id>1</id>
- <title>pfSense AuthNG Wizard</title>
- <disableheader>true</disableheader>
- <description>
- This wizard will guide you through the initial configuration of
- the pfSense authentication system.
- </description>
- <fields>
- <field>
- <name>Next</name>
- <type>submit</type>
- </field>
- </fields>
-</step>
-<step>
- <id>2</id>
- <title>pfSense Backend settings</title>
- <description>
- On this screen you will define where to define pfSense users and groups
- </description>
- <fields>
- <field>
- <name>PrincipalStore</name>
- <type>select</type>
- <donotdisable>true</donotdisable>
- <bindstofield>installedpackages->authng->config->principal_store</bindstofield>
- <options>
- <option>
- <name>XML</name>
- <value>xml</value>
- </option>
- <option>
- <name>LDAP</name>
- <value>ldap</value>
- </option>
- <option>
- <name>DB</name>
- <value>db</value>
- </option>
- </options>
- </field>
- <field>
- <name>Backend</name>
- <type>select</type>
- <donotdisable>true</donotdisable>
- <bindstofield>installedpackages->authng->config->backend</bindstofield>
- <options>
- <option>
- <name>htpasswd</name>
- <value>htpasswd</value>
- </option>
- <option>
- <name>PAM</name>
- <value>pam</value>
- </option>
- <option>
- <name>Radius</name>
- <value>radius</value>
- </option>
- <option>
- <name>passwd</name>
- <value>passwd</value>
- </option>
- <option>
- <name>LDAP</name>
- <value>ldap</value>
- </option>
- </options>
- </field>
- <field>
- <name>AuthenticationMethod</name>
- <type>select</type>
- <donotdisable>true</donotdisable>
- <bindstofield>installedpackages->authng->config->auth_method</bindstofield>
- <options>
- <option>
- <name>Session</name>
- <value>session</value>
- </option>
- <option>
- <name>Basic</name>
- <value>basic</value>
- </option>
- </options>
- </field>
- </fields
-</step>
-<step>
- <id>3</id>
- <title>Time Server Information</title>
- <description>Please enter the time, date and time zone.</description>
- <fields>
- <field>
- <name>Time server dns name</name>
- <description>Enter the name of the time server.</description>
- <type>input</type>
- <bindstofield>system->timeservers</bindstofield>
- </field>
- <field>
- <name>Timezone</name>
- <type>timezone_select</type>
- <bindstofield>system->timezone</bindstofield>
- </field>
- <field>
- <name>Next</name>
- <type>submit</type>
- </field>
- </fields>
-</step>
-<step>
- <id>4</id>
- <disableallfieldsbydefault>true</disableallfieldsbydefault>
- <title>Configure WAN Interface</title>
- <description>On this screen we will configure the Wide Area Network information.</description>
- <javascriptafterformdisplay>
- var selectedItem = 0;
- if(document.forms[0].ipaddress.value == 'dhcp') {
- selectedItem = 1;
- document.forms[0].ipaddress.value = '';
- } else if(document.forms[0].ipaddress.value == 'PPPoE') {
- selectedItem = 2;
- document.forms[0].ipaddress.value = '';
- } else if(document.forms[0].ipaddress.value == 'PPTP') {
- selectedItem = 3;
- document.forms[0].ipaddress.value = '';
- } else if(document.forms[0].ipaddress.value == 'BigPond') {
- selectedItem = 4;
- document.forms[0].ipaddress.value = '';
- } else {
- selectedItem = 0;
- }
- document.forms[0].selectedtype.selectedIndex = selectedItem;
- enableitems(selectedItem);
- </javascriptafterformdisplay>
- <fields>
- <field>
- <name>SelectedType</name>
- <type>select</type>
- <donotdisable>true</donotdisable>
- <options>
- <option>
- <name>Static</name>
- <value>Static</value>
- <enablefields>ipaddress,subnetmask,gateway</enablefields>
- </option>
- <option>
- <name>DHCP</name>
- <value>dhcp</value>
- <enablefields>dhcphostname</enablefields>
- </option>
- <option>
- <name>PPPoE</name>
- <value>pppoe</value>
- <enablefields>pppoeusername,pppoepassword,pppoeservicename,pppoedialondemand,pppoeidletimeout</enablefields>
- </option>
- <option>
- <name>PPTP</name>
- <value>pptp</value>
- <enablefields>pptpusername,pptppassword,pptplocalipaddress,pptplocalsubnet,pptpremoteipaddress,pptpdialondemand,pptpidletimeout
- </enablefields>
- </option>
- <option>
- <name>BigPond</name>
- <value>bigpond</value>
- <enablefields>bigpondusername,bigpondpassword,bigpondauthenticationserver,bigpondauthenticationdomain,bigpondminheartbeatinterval</enablefields>
- </option>
- </options>
- </field>
- <field>
- <name>General configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <donotdisable>true</donotdisable>
- <name>MAC Address</name>
- <bindstofield>interfaces->wan->spoofmac</bindstofield>
- <type>input</type>
- <description> This field can be used to modify ("spoof") the MAC address of the WAN interface (may be required with some cable connections) Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank</description>
- </field>
- <field>
- <donotdisable>true</donotdisable>
- <name>MTU</name>
- <type>input</type>
- <bindstofield>interfaces->wan->mtu</bindstofield>
- <description> If you enter a value in this field, then MSS clamping for TCP connections to the value entered above minus 40 (TCP/IP header size) will be in effect. If you leave this field blank, an MTU of 1492 bytes for PPPoE and 1500 bytes for all other connection types will be assumed.</description>
- </field>
- <field>
- <name>Static IP Configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <name>IP Address</name>
- <bindstofield>interfaces->wan->ipaddr</bindstofield>
- <type>input</type>
- <typehint> / </typehint>
- <combinefieldsbegin>true</combinefieldsbegin>
- </field>
- <field>
- <combinefieldsend>true</combinefieldsend>
- <dontdisplayname>true</dontdisplayname>
- <dontcombinecells>true</dontcombinecells>
- <name>Subnet Mask</name>
- <bindstofield>interfaces->wan->subnet</bindstofield>
- <type>subnet_select</type>
- </field>
- <field>
- <name>Gateway</name>
- <bindstofield>interfaces->wan->gateway</bindstofield>
- <type>input</type>
- </field>
- <field>
- <name>DHCP client configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <name>DHCP Hostname</name>
- <type>input</type>
- <bindstofield>interfaces->wan->dhcphostname</bindstofield>
- <description> The value in this field is sent as the DHCP client identifier and hostname when requesting a DHCP lease. Some ISPs may require this (for client identification).</description>
- </field>
- <field>
- <name>PPPoE configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <name>PPPoE Username</name>
- <type>input</type>
- <bindstofield>pppoe->username</bindstofield>
- </field>
- <field>
- <name>PPPoE Password</name>
- <type>input</type>
- <bindstofield>pppoe->password</bindstofield>
- </field>
- <field>
- <name>PPPoE Service name</name>
- <type>input</type>
- <description>Hint: this field can usually be left empty</description>
- </field>
- <field>
- <name>PPPoE Dial on demand</name>
- <typehint>Enable Dial-On-Demand mode</typehint>
- <type>checkbox</type>
- <description>This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.</description>
- </field>
- <field>
- <name>PPPoE Idle timeout</name>
- <type>input</type>
- <description>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.</description>
- </field>
- <field>
- <name>PPTP configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <name>PPTP Username</name>
- <type>input</type>
- <bindstofield>pptp->username</bindstofield>
- </field>
- <field>
- <name>PPTP Password</name>
- <type>input</type>
- <bindstofield>pptp->password</bindstofield>
- </field>
- <field>
- <combinefieldsbegin>true</combinefieldsbegin>
- <name>PPTP Local IP Address</name>
- <type>input</type>
- <typehint> / </typehint>
- <bindstofield>pptp->local</bindstofield>
- </field>
- <field>
- <combinefieldsend>true</combinefieldsend>
- <dontdisplayname>true</dontdisplayname>
- <dontcombinecells>true</dontcombinecells>
- <name>pptplocalsubnet</name>
- <bindstofield>pptp->subnet</bindstofield>
- <type>subnet_select</type>
- </field>
- <field>
- <name>PPTP Remote IP Address</name>
- <bindstofield>pptp->remote</bindstofield>
- <type>input</type>
- </field>
- <field>
- <name>PPTP Dial on demand</name>
- <typehint>Enable Dial-On-Demand mode</typehint>
- <type>checkbox</type>
- <description>This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.</description>
- </field>
- <field>
- <name>PPTP Idle timeout</name>
- <type>input</type>
- <description>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.</description>
- </field>
- <field>
- <name>BigPond configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <name>BigPond Username</name>
- <type>input</type>
- <bindstofield>bigpond->username</bindstofield>
- </field>
- <field>
- <name>BigPond Password</name>
- <type>input</type>
- <bindstofield>bigpond->password</bindstofield>
- </field>
- <field>
- <name>BigPond Authentication server</name>
- <type>input</type>
- <bindstofield>bigpond->authserver</bindstofield>
- <description>If this field is left empty, the default ("dce-server") is used.</description>
- </field>
- <field>
- <name>BigPond Authentication domain</name>
- <type>input</type>
- <bindstofield>bigpond->authdomain</bindstofield>
- <description>If this field is left empty, the domain name assigned via DHCP will be used. Note: the BigPond client implicitly sets the "Allow DNS server list to be overridden by DHCP/PPP on WAN" on the System: General setup page.</description>
- </field>
- <field>
- <name>BigPond min heartbeat interval</name>
- <type>input</type>
- <typehint>seconds</typehint>
- <bindstofield>bigpond->minheartbeatinterval</bindstofield>
- <description> Setting this to a sensible value (e.g. 60 seconds) can protect against DoS attacks.</description>
- </field>
- <field>
- <name>RFC1918 Networks</name>
- <type>listtopic</type>
- </field>
- <field>
- <donotdisable>true</donotdisable>
- <name>Block RFC1918 Private Networks</name>
- <description> When set, this option blocks traffic from IP addresses that are reserved for private networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as well as loopback addresses (127/8). You should generally leave this option turned on, unless your WAN network lies in such a private address space, too.</description>
- <type>checkbox</type>
- <bindstofield>interfaces->wan->blockpriv</bindstofield>
- <typehint>Block private networks from entering via WAN</typehint>
- </field>
- <field>
- <name>Block bogon networks</name>
- <type>listtopic</type>
- </field>
- <field>
- <donotdisable>true</donotdisable>
- <name>Block bogon networks</name>
- <description>Block bogon networks when set, this option blocks traffic from IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA. Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive.</description>
- <type>checkbox</type>
- <bindstofield>interfaces->wan->blockbogons</bindstofield>
- <typehint>Block non-Internet routed networks from entering via WAN</typehint>
- </field>
- <field>
- <name>Next</name>
- <type>submit</type>
- </field>
- </fields>
- <stepsubmitbeforesave>
- if($_POST['selectedtype'] == "Static") { } else {
- $_POST['ipaddress'] = $_POST['selectedtype'];
- $config['interfaces']['wan']['ipaddr'] = $_POST['selectedtype'];
- write_config();
- }
- </stepsubmitbeforesave>
-</step>
-<step>
- <id>5</id>
- <title>Configure LAN Interface</title>
- <description>On this screen we will configure the Local Area Network information.</description>
- <fields>
- <field>
- <name>LAN IP Address</name>
- <type>input</type>
- <bindstofield>interfaces->lan->ipaddr</bindstofield>
- <description>Type dhcp if this interface uses dhcp to obtain its ip address.</description>
- </field>
- <field>
- <name>Subnet Mask</name>
- <type>subnet_select</type>
- <bindstofield>interfaces->lan->subnet</bindstofield>
- </field>
- <field>
- <name>Next</name>
- <type>submit</type>
- </field>
- </fields>
- <stepsubmitphpaction>
- $ft = split("\.", $_POST['lanipaddress']);
- $ft_ip = $ft[0] . "." . $ft[1] . "." . $ft[2] . ".";
- $config['dhcpd']['lan']['range']['from'] = $ft_ip . "10";
- $highestip = gen_subnet_max($_POST['lanipaddress'], $config['interfaces']['lan']['subnet']);
- $hi = split("\.", $highestip);
- $highestip = $hi[3]-10;
- $config['dhcpd']['lan']['range']['to'] = $ft_ip . $highestip;
- </stepsubmitphpaction>
-</step>
-<step>
- <id>6</id>
- <title>Set Admin WebGUI Password</title>
- <description>On this screen we will set the Admin password which is used to access the WebGUI and also SSH services if you wish to enable.</description>
- <fields>
- <field>
- <name>Admin Password</name>
- <type>password</type>
- </field>
- <field>
- <name>Admin Password AGAIN</name>
- <type>password</type>
- </field>
- <field>
- <name>Next</name>
- <type>submit</type>
- </field>
- </fields>
- <stepsubmitphpaction>
- if($_POST['adminpassword'] != "") {
- if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
- $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w");
- $salt = md5(time());
- $crypted_pw = crypt($_POST['adminpassword'],$salt);
- fwrite($fd, $crypted_pw);
- pclose($fd);
- $config['system']['password'] = crypt($_POST['adminpassword']);
- write_config();
- system_password_configure();
- } else {
- print_info_box_np("Passwords do not match! Please press back in your browser window and correct.");
- die;
- }
- }
- </stepsubmitphpaction>
-</step>
-<step>
- <id>7</id>
- <title>Reload configuration</title>
- <disableheader>true</disableheader>
- <description>Click 'Reload' to reload pfSense with new changes. If you changed the password, pfSense will ask you to log in again.</description>
- <fields>
- <field>
- <name>Reload</name>
- <type>submit</type>
- </field>
- </fields>
-</step>
-<step>
- <id>8</id>
- <title>Reload in progress</title>
- <description>A reload is now in progress. Please wait. &lt;p&gt; The system will automatically try to access $myurl in 120 seconds. &lt;p&gt; You can click on the icon above to access the site more quickly.
- &lt;meta http-equiv="refresh" content="60; url=$myurl" &gt;</description>
- <stepafterformdisplay>
- reload_all();
- </stepafterformdisplay>
-</step>
-</pfsensewizard>