summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2012-10-01 14:38:03 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2012-10-01 14:38:03 +0200
commitd8cdfd3e34fd57bfde7061620007a712321c4d12 (patch)
treeb41e4bbd5ba58ca0595058725856554f2b768379 /usr
parent90763c7fabf9dbcba50dcb15748c7c6d5dc148ec (diff)
parent19d61d2731c1fb0baf877632e8e482bf3ff57bdd (diff)
downloadpfsense-d8cdfd3e34fd57bfde7061620007a712321c4d12.zip
pfsense-d8cdfd3e34fd57bfde7061620007a712321c4d12.tar.gz
Merge branch 'master' of git://github.com/bsdperimeter/pfsense
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/ppp-linkdown11
-rwxr-xr-xusr/local/sbin/ppp-linkup7
-rwxr-xr-xusr/local/www/head.inc2
-rwxr-xr-xusr/local/www/load_balancer_monitor.php4
-rwxr-xr-xusr/local/www/load_balancer_pool.php4
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_action.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol.php4
-rwxr-xr-xusr/local/www/load_balancer_virtual_server.php6
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php6
-rwxr-xr-xusr/local/www/services_captiveportal.php10
-rw-r--r--usr/local/www/system_authservers.php104
-rwxr-xr-xusr/local/www/system_firmware_settings.php21
-rw-r--r--usr/local/www/system_groupmanager.php150
-rw-r--r--usr/local/www/system_usermanager.php154
-rwxr-xr-xusr/local/www/vpn_ipsec_mobile.php52
-rw-r--r--usr/local/www/vpn_openvpn_client.php6
-rw-r--r--usr/local/www/vpn_openvpn_server.php9
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php19
19 files changed, 336 insertions, 241 deletions
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index bd4f606..56a96d9 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -9,14 +9,15 @@ if [ "$3" != "" ]; then
/sbin/pfctl -k $3/32
pfctl -K $3/32
fi
-if [ "$4" != "" ]; then
- echo "Removing states to $4" | logger -t ppp-linkdown
- /sbin/pfctl -b 0.0.0.0/32 -b $4/32
+
+OLD_ROUTER=`/bin/cat /tmp/${1}_router`
+if [ "${OLD_ROUTER}" != "" ]; then
+ echo "Removing states to ${OLD_ROUTER}" | logger -t ppp-linkdown
+ /sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
if [ -f "/tmp/${interface}_defaultgw" ]; then
- route delete default $4
+ route delete default ${OLD_ROUTER}
fi
-
fi
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown $1:
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index dba4412..3a62fbb 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,6 +1,13 @@
#!/bin/sh
if [ "$2" == "inet" ]; then
+
+ OLD_ROUTER=`/bin/cat /tmp/${1}_router`
+ if [ "${OLD_ROUTER}" != "" ]; then
+ echo "Removing states to old router ${OLD_ROUTER}" | logger -t ppp-linkup
+ /sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
+ fi
+
# let the configuration system know that the ipv4 has changed.
/bin/echo $4 > /tmp/$1_router
/bin/echo $3 > /tmp/$1_ip
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index e73ab0a..5063728 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -18,7 +18,7 @@ else
* If this device is an apple ipod/iphone
* switch the theme to one that works with it.
*/
-$lowres_ua = array("iPhone", "iPod", "iPad", "Android", "BlackBerry", "Opera Mini", "Opera Mobi");
+$lowres_ua = array("iPhone", "iPod", "iPad", "Android", "BlackBerry", "Opera Mini", "Opera Mobi", "PlayBook");
foreach($lowres_ua as $useragent)
if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
$g['theme'] = empty($g['theme_lowres']) ? "pfsense" : $g['theme_lowres'];
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index 0f2bddb..b9ae1e2 100755
--- a/usr/local/www/load_balancer_monitor.php
+++ b/usr/local/www/load_balancer_monitor.php
@@ -64,10 +64,10 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_monitor[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_monitor)) {
/* make sure no pools reference this entry */
if (is_array($config['load_balancer']['lbpool'])) {
- foreach ($config['load_balancer']['pool'] as $pool) {
+ foreach ($config['load_balancer']['lbpool'] as $pool) {
if ($pool['monitor'] == $a_monitor[$_GET['id']]['name']) {
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one pool.");
break;
diff --git a/usr/local/www/load_balancer_pool.php b/usr/local/www/load_balancer_pool.php
index 584d184..9c5f179 100755
--- a/usr/local/www/load_balancer_pool.php
+++ b/usr/local/www/load_balancer_pool.php
@@ -64,11 +64,11 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_pool[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_pool)) {
/* make sure no virtual servers reference this entry */
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
- if ($vs['pool'] == $a_pool[$_GET['id']]['name']) {
+ if ($vs['poolname'] == $a_pool[$_GET['id']]['name']) {
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server.");
break;
}
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index 252c13b..32b2e4f 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -138,8 +138,8 @@ if ($_POST) {
if (isset($id) && $a_pool[$id]) {
/* modify all virtual servers with this name */
for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
- if ($config['load_balancer']['virtual_server'][$i]['pool'] == $a_pool[$id]['name'])
- $config['load_balancer']['virtual_server'][$i]['pool'] = $poolent['name'];
+ if ($config['load_balancer']['virtual_server'][$i]['lbpool'] == $a_pool[$id]['name'])
+ $config['load_balancer']['virtual_server'][$i]['lbpool'] = $poolent['name'];
}
$a_pool[$id] = $poolent;
} else
diff --git a/usr/local/www/load_balancer_relay_action.php b/usr/local/www/load_balancer_relay_action.php
index ce853ca..6e0a112 100755
--- a/usr/local/www/load_balancer_relay_action.php
+++ b/usr/local/www/load_balancer_relay_action.php
@@ -65,7 +65,7 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_action[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_action)) {
/* make sure no relay protocols reference this entry */
if (is_array($config['load_balancer']['lbprotocol'])) {
foreach ($config['load_balancer']['lbprotocol'] as $lbp) {
@@ -92,7 +92,7 @@ if ($_GET['act'] == "del") {
/* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) {
for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) {
$a_vs[$i]['options'][$o] = "
- $a_vs[$i]['pool'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['pool']]}\">{$a_vs[$i]['pool']}</a>";
+ $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
} else {
diff --git a/usr/local/www/load_balancer_relay_protocol.php b/usr/local/www/load_balancer_relay_protocol.php
index b25c840..be812ce 100755
--- a/usr/local/www/load_balancer_relay_protocol.php
+++ b/usr/local/www/load_balancer_relay_protocol.php
@@ -63,7 +63,7 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_protocol[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_protocol)) {
/* make sure no virtual servers reference this entry */
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
@@ -88,7 +88,7 @@ if ($_GET['act'] == "del") {
/* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) {
for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) {
$a_vs[$i]['options'][$o] = "
- $a_vs[$i]['pool'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['pool']]}\">{$a_vs[$i]['pool']}</a>";
+ $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
} else {
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php
index 6ed11d4..3ae600a 100755
--- a/usr/local/www/load_balancer_virtual_server.php
+++ b/usr/local/www/load_balancer_virtual_server.php
@@ -63,7 +63,7 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_vs[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_vs)) {
if (!$input_errors) {
unset($a_vs[$_GET['id']]);
@@ -82,7 +82,7 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
}
for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
if($a_vs[$i]) {
- $a_vs[$i]['pool'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['pool']]}\">{$a_vs[$i]['pool']}</a>";
+ $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
} else {
@@ -128,7 +128,7 @@ include("head.inc");
$t->add_column(gettext('Protocol'),'relay_protocol',10);
$t->add_column(gettext('IP Address'),'ipaddr',15);
$t->add_column(gettext('Port'),'port',10);
- $t->add_column(gettext('Pool'),'pool',15);
+ $t->add_column(gettext('Pool'),'poolname',15);
$t->add_column(gettext('Fall Back Pool'),'sitedown',15);
$t->add_column(gettext('Description'),'descr',30);
$t->add_button('edit');
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 01b0ef3..554bf36 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -107,7 +107,7 @@ if ($_POST) {
update_if_changed("name", $vsent['name'], $_POST['name']);
update_if_changed("descr", $vsent['descr'], $_POST['descr']);
- update_if_changed("pool", $vsent['pool'], $_POST['pool']);
+ update_if_changed("poolname", $vsent['poolname'], $_POST['poolname']);
update_if_changed("port", $vsent['port'], $_POST['port']);
update_if_changed("sitedown", $vsent['sitedown'], $_POST['sitedown']);
update_if_changed("ipaddr", $vsent['ipaddr'], $_POST['ipaddr']);
@@ -198,11 +198,11 @@ include("head.inc");
<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>
<?php else: ?>
- <select id="pool" name="pool">
+ <select id="poolname" name="poolname">
<?php
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
- if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['pool'] )
+ if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['poolname'] )
$selected = " SELECTED";
echo "<option value=\"{$config['load_balancer']['lbpool'][$i]['name']}\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
}
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index f608191..c421e80 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -816,7 +816,7 @@ function enable_change(enable_change) {
<tr>
<td class="vncell" valign="top"><?=gettext("Type"); ?></td>
<td class="vtable"><select name="radiusvendor" id="radiusvendor">
- <option><?=gettext("default"); ?></option>
+ <option value="default"><?php echo gettext("default"); ?></option>
<?php
$radiusvendors = array("cisco");
foreach ($radiusvendors as $radiusvendor){
@@ -836,14 +836,14 @@ function enable_change(enable_change) {
<td class="vncell" valign="top"><?=gettext("MAC address format"); ?></td>
<td class="vtable">
<select name="radmac_format" id="radmac_format">
- <option><?=gettext("default"); ?></option>
+ <option value="default"><?php echo gettext("default"); ?></option>
<?php
- $macformats = array(gettext("singledash"),gettext("ietf"),gettext("cisco"),gettext("unformatted"));
+ $macformats = array("singledash","ietf","cisco","unformatted");
foreach ($macformats as $macformat) {
if ($pconfig['radmac_format'] == $macformat)
- echo "<option selected value=\"$macformat\">$macformat</option>\n";
+ echo "<option selected value=\"$macformat\">",gettext($macformat),"</option>\n";
else
- echo "<option value=\"$macformat\">$macformat</option>\n";
+ echo "<option value=\"$macformat\">",gettext($macformat),"</option>\n";
}
?>
</select></br>
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php
index 158e615..bc88f27 100644
--- a/usr/local/www/system_authservers.php
+++ b/usr/local/www/system_authservers.php
@@ -2,7 +2,7 @@
/*
system_authservers.php
- Copyright (C) 2010 Ermal Lu�i
+ Copyright (C) 2010 Ermal Luçi
Copyright (C) 2008 Shrew Soft Inc.
All rights reserved.
@@ -733,54 +733,60 @@ function select_clicked() {
<?php else: ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Server Name");?></td>
- <td width="25%" class="listhdrr"><?=gettext("Type");?></td>
- <td width="35%" class="listhdrr"><?=gettext("Host Name");?></td>
- <td width="10%" class="list"></td>
- </tr>
- <?php
- $i = 0;
- foreach($a_server as $server):
- $name = htmlspecialchars($server['name']);
- $type = htmlspecialchars($auth_server_types[$server['type']]);
- $host = htmlspecialchars($server['host']);
- ?>
- <tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
- <td class="listlr"><?=$name?>&nbsp;</td>
- <td class="listr"><?=$type;?>&nbsp;</td>
- <td class="listr"><?=$host;?>&nbsp;</td>
- <td valign="middle" nowrap class="list">
- <?php if ($i < (count($a_server) - 1)): ?>
- <a href="system_authservers.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
- </a>
- &nbsp;
- <a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" 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_authservers.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>
- <?=gettext("Additional authentication servers can be added here.");?>
- </p>
- </td>
- </tr>
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th width="25%" class="listhdrr"><?=gettext("Server Name");?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Type");?></th>
+ <th width="35%" class="listhdrr"><?=gettext("Host Name");?></th>
+ <th width="10%" class="list"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_server as $server):
+ $name = htmlspecialchars($server['name']);
+ $type = htmlspecialchars($auth_server_types[$server['type']]);
+ $host = htmlspecialchars($server['host']);
+ ?>
+ <tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
+ <td class="listlr"><?=$name?>&nbsp;</td>
+ <td class="listr"><?=$type;?>&nbsp;</td>
+ <td class="listr"><?=$host;?>&nbsp;</td>
+ <td valign="middle" nowrap class="list">
+ <?php if ($i < (count($a_server) - 1)): ?>
+ <a href="system_authservers.php?act=edit&id=<?=$i;?>">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
+ </a>
+ &nbsp;
+ <a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
+ </a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++; endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="3"></td>
+ <td class="list">
+ <a href="system_authservers.php?act=new">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>
+ <?=gettext("Additional authentication servers can be added here.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
</table>
<?php endif; ?>
diff --git a/usr/local/www/system_firmware_settings.php b/usr/local/www/system_firmware_settings.php
index 5792a2e..34849d1 100755
--- a/usr/local/www/system_firmware_settings.php
+++ b/usr/local/www/system_firmware_settings.php
@@ -50,12 +50,17 @@ if ($_POST) {
unset($config['system']['firmware']['alturl']['enable']);
unset($config['system']['firmware']['alturl']['firmwareurl']);
unset($config['system']['firmware']['alturl']);
- unset($config['system']['firmware']);
+ unset($config['system']['firmware']);
}
if($_POST['allowinvalidsig'] == "yes")
- $config['system']['firmware']['allowinvalidsig'] = true;
- else
- unset($config['system']['firmware']['allowinvalidsig']);
+ $config['system']['firmware']['allowinvalidsig'] = true;
+ else
+ unset($config['system']['firmware']['allowinvalidsig']);
+
+ if($_POST['disablecheck'] == "yes")
+ $config['system']['firmware']['disablecheck'] = true;
+ else
+ unset($config['system']['firmware']['disablecheck']);
if($_POST['synconupgrade'] == "yes")
$config['system']['gitsync']['synconupgrade'] = true;
@@ -166,6 +171,14 @@ function enable_altfirmwareurl(enable_over) {
<?=gettext("Allow auto-update firmware images with a missing or invalid digital signature to be used."); ?>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dashboard check"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="disablecheck" type="checkbox" id="disablecheck" value="yes" <?php if (isset($curcfg['disablecheck'])) echo "checked"; ?> />
+ <br />
+ <?=gettext("Disable the automatic dashboard auto-update check."); ?>
+ </td>
+ </tr>
<?php if(file_exists("/usr/local/bin/git") && $g['platform'] == "pfSense"): ?>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php
index def20c7..d6ffe25 100644
--- a/usr/local/www/system_groupmanager.php
+++ b/usr/local/www/system_groupmanager.php
@@ -399,78 +399,84 @@ function presubmit() {
<?php else: ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Group name");?></td>
- <td width="25%" class="listhdrr"><?=gettext("Description");?></td>
- <td width="30%" class="listhdrr"><?=gettext("Member Count");?></td>
- <td width="10%" class="list"></td>
- </tr>
- <?php
- $i = 0;
- foreach($a_group as $group):
-
- if($group['scope'] == "system")
- $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
- else
- $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
- $groupcount = count($group['member']);
- if ($group["name"] == "all")
- $groupcount = count($config['system']['user']);
- ?>
- <tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
- <td class="listlr">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="left" valign="center">
- <img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
- </td>
- </td>
- <td align="left" valign="middle">
- <?=htmlspecialchars($group['name']); ?>&nbsp;
- </td>
- </tr>
- </table>
- </td>
- <td class="listr">
- <?=htmlspecialchars($group['description']);?>&nbsp;
- </td>
- <td class="listbg">
- <?=$groupcount;?>
- </td>
- <td valign="middle" nowrap class="list">
- <a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
- </a>
- &nbsp;
- <?php if($group['scope'] != "system"): ?>
- <a href="system_groupmanager.php?act=delgroup&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">
- </a>
- <?php endif; ?>
- </td>
- </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">
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>
- <?=gettext("Additional webConfigurator groups can be added here.
- Group permissions can be assigned which are inherited by users who are members of the group.
- An icon that appears grey indicates that it is a system defined object.
- Some system object properties can be modified but they cannot be deleted.");?>
- </p>
- </td>
- </tr>
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th width="25%" class="listhdrr"><?=gettext("Group name");?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Description");?></th>
+ <th width="30%" class="listhdrr"><?=gettext("Member Count");?></th>
+ <th width="10%" class="list"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_group as $group):
+
+ if($group['scope'] == "system")
+ $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
+ else
+ $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
+ $groupcount = count($group['member']);
+ if ($group["name"] == "all")
+ $groupcount = count($config['system']['user']);
+ ?>
+ <tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
+ <td class="listlr">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="left" valign="center">
+ <img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
+ </td>
+ </td>
+ <td align="left" valign="middle">
+ <?=htmlspecialchars($group['name']); ?>&nbsp;
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="listr">
+ <?=htmlspecialchars($group['description']);?>&nbsp;
+ </td>
+ <td class="listbg">
+ <?=$groupcount;?>
+ </td>
+ <td valign="middle" nowrap class="list">
+ <a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
+ </a>
+ &nbsp;
+ <?php if($group['scope'] != "system"): ?>
+ <a href="system_groupmanager.php?act=delgroup&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">
+ </a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++;
+ endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <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">
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>
+ <?=gettext("Additional webConfigurator groups can be added here.
+ Group permissions can be assigned which are inherited by users who are members of the group.
+ An icon that appears grey indicates that it is a system defined object.
+ Some system object properties can be modified but they cannot be deleted.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
</table>
<?php endif; ?>
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index 68ac908..ab69fe5 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -780,80 +780,86 @@ function sshkeyClicked(obj) {
<?php else: ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Username"); ?></td>
- <td width="25%" class="listhdrr"><?=gettext("Full name"); ?></td>
- <td width="5%" class="listhdrr"><?=gettext("Disabled"); ?></td>
- <td width="25%" class="listhdrr"><?=gettext("Groups"); ?></td>
- <td width="10%" class="list"></td>
- </tr>
- <?php
- $i = 0;
- foreach($a_user as $userent):
- ?>
- <tr ondblclick="document.location='system_usermanager.php?act=edit&id=<?=$i;?>'">
- <td class="listlr">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="left" valign="center">
- <?php
- if($userent['scope'] != "user")
- $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user-grey.png";
- else
- $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
- ?>
- <img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
- </td>
- <td align="left" valign="middle">
- <?=htmlspecialchars($userent['name']);?>
- </td>
- </tr>
- </table>
- </td>
- <td class="listr"><?=htmlspecialchars($userent['descr']);?>&nbsp;</td>
- <td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
- <td class="listbg">
- <?=implode(",",local_user_get_groups($userent));?>
- &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="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
- </a>
- <?php if($userent['scope'] != "system"): ?>
- &nbsp;
- <a href="system_usermanager.php?act=deluser&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="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
- </a>
- <?php endif; ?>
- </td>
- </tr>
- <?php
- $i++;
- endforeach;
- ?>
- <tr>
- <td class="list" colspan="4"></td>
- <td class="list">
- <a href="system_usermanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <p>
- <?=gettext("Additional users can be added here. User permissions for accessing " .
- "the webConfigurator can be assigned directly or inherited from group memberships. " .
- "An icon that appears grey indicates that it is a system defined object. " .
- "Some system object properties can be modified but they cannot be deleted."); ?>
- <br/><br/>
- <?=gettext("Accounts created here are also used for other parts of the system " .
- "such as OpenVPN, IPsec, and Captive Portal.");?>
- </p>
- </td>
- </tr>
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th width="25%" class="listhdrr"><?=gettext("Username"); ?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Full name"); ?></th>
+ <th width="5%" class="listhdrr"><?=gettext("Disabled"); ?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Groups"); ?></th>
+ <th width="10%" class="list"></td>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_user as $userent):
+ ?>
+ <tr ondblclick="document.location='system_usermanager.php?act=edit&id=<?=$i;?>'">
+ <td class="listlr">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="left" valign="center">
+ <?php
+ if($userent['scope'] != "user")
+ $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user-grey.png";
+ else
+ $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
+ ?>
+ <img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
+ </td>
+ <td align="left" valign="middle">
+ <?=htmlspecialchars($userent['name']);?>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="listr"><?=htmlspecialchars($userent['descr']);?>&nbsp;</td>
+ <td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
+ <td class="listbg">
+ <?=implode(",",local_user_get_groups($userent));?>
+ &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="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
+ </a>
+ <?php if($userent['scope'] != "system"): ?>
+ &nbsp;
+ <a href="system_usermanager.php?act=deluser&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="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
+ </a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++;
+ endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="4"></td>
+ <td class="list">
+ <a href="system_usermanager.php?act=new">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <p>
+ <?=gettext("Additional users can be added here. User permissions for accessing " .
+ "the webConfigurator can be assigned directly or inherited from group memberships. " .
+ "An icon that appears grey indicates that it is a system defined object. " .
+ "Some system object properties can be modified but they cannot be deleted."); ?>
+ <br/><br/>
+ <?=gettext("Accounts created here are also used for other parts of the system " .
+ "such as OpenVPN, IPsec, and Captive Portal.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
</table>
<?php endif; ?>
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php
index 34987d7..1da67e1 100755
--- a/usr/local/www/vpn_ipsec_mobile.php
+++ b/usr/local/www/vpn_ipsec_mobile.php
@@ -61,6 +61,7 @@ if (count($a_client)) {
$pconfig['net_list'] = $a_client['net_list'];
$pconfig['save_passwd'] = $a_client['save_passwd'];
$pconfig['dns_domain'] = $a_client['dns_domain'];
+ $pconfig['dns_split'] = $a_client['dns_split'];
$pconfig['dns_server1'] = $a_client['dns_server1'];
$pconfig['dns_server2'] = $a_client['dns_server2'];
$pconfig['dns_server3'] = $a_client['dns_server3'];
@@ -87,6 +88,9 @@ if (count($a_client)) {
if ($pconfig['dns_domain'])
$pconfig['dns_domain_enable'] = true;
+ if ($pconfig['dns_split'])
+ $pconfig['dns_split_enable'] = true;
+
if ($pconfig['dns_server1']||$pconfig['dns_server2']||$pconfig['dns_server3']||$pconfig['dns_server4'])
$pconfig['dns_server_enable'] = true;
@@ -137,6 +141,18 @@ if ($_POST['submit']) {
if (!is_domain($pconfig['dns_domain']))
$input_errors[] = gettext("A valid value for 'DNS Default Domain' must be specified.");
+ if ($pconfig['dns_split_enable']) {
+ if (!empty($pconfig['dns_split'])) {
+ $domain_array=preg_split("/[ ,]+/",$pconfig['dns_split']);
+ foreach ($domain_array as $curdomain) {
+ if (!is_domain($curdomain)) {
+ $input_errors[] = gettext("A valid split DNS domain list must be specified.");
+ break;
+ }
+ }
+ }
+ }
+
if ($pconfig['dns_server_enable']) {
if (!$pconfig['dns_server1'] && !$pconfig['dns_server2'] &&
!$pconfig['dns_server3'] && !$pconfig['dns_server4'] )
@@ -187,6 +203,9 @@ if ($_POST['submit']) {
if ($pconfig['dns_domain_enable'])
$client['dns_domain'] = $pconfig['dns_domain'];
+ if ($pconfig['dns_split_enable'])
+ $client['dns_split'] = $pconfig['dns_split'];
+
if ($pconfig['dns_server_enable']) {
$client['dns_server1'] = $pconfig['dns_server1'];
$client['dns_server2'] = $pconfig['dns_server2'];
@@ -248,6 +267,14 @@ function dns_domain_change() {
document.iform.dns_domain.disabled = 1;
}
+function dns_split_change() {
+
+ if (document.iform.dns_split_enable.checked)
+ document.iform.dns_split.disabled = 0;
+ else
+ document.iform.dns_split.disabled = 1;
+}
+
function dns_server_change() {
if (document.iform.dns_server_enable.checked) {
@@ -475,6 +502,30 @@ function login_banner_change() {
</table>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Split DNS"); ?></td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr>
+ <td>
+ <?php set_checked($pconfig['dns_split_enable'],$chk); ?>
+ <input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?=$chk;?> onClick="dns_split_change()">
+ </td>
+ <td>
+ <?=gettext("Provide a list of split DNS domain names to clients. Enter a comma separated list."); ?><br>
+ <?=gettext("NOTE: If left blank, and a default domain is set, it will be used for this value."); ?>
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr>
+ <td>
+ <input name="dns_split" type="text" class="formfld unknown" id="dns_split" size="30" value="<?=htmlspecialchars($pconfig['dns_split']);?>">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable">
@@ -616,6 +667,7 @@ function login_banner_change() {
<script language="JavaScript">
pool_change();
dns_domain_change();
+dns_split_change();
dns_server_change();
wins_server_change();
pfs_group_change();
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index f2002ed..8b269f5 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -75,12 +75,12 @@ else
if ($_GET['act'] == "del") {
- if (!$a_client[$id]) {
+ if (!isset($a_client[$id])) {
pfSenseHeader("vpn_openvpn_client.php");
exit;
}
-
- openvpn_delete('client', $a_client[$id]);
+ if (!empty($a_client[$id]))
+ openvpn_delete('client', $a_client[$id]);
unset($a_client[$id]);
write_config();
$savemsg = gettext("Client successfully deleted")."<br/>";
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index d098f43..c187878 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -76,12 +76,12 @@ else
if ($_GET['act'] == "del") {
- if (!$a_server[$id]) {
+ if (!isset($a_server[$id])) {
pfSenseHeader("vpn_openvpn_server.php");
exit;
}
-
- openvpn_delete('server', $a_server[$id]);
+ if (!empty($a_server[$id]))
+ openvpn_delete('server', $a_server[$id]);
unset($a_server[$id]);
write_config();
$savemsg = gettext("Server successfully deleted")."<br/>";
@@ -202,9 +202,6 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
- if ($pconfig['dev_mode'] <> $a_server[$id]['dev_mode'])
- openvpn_delete('server', $a_server[$id]);// delete(rename) interface so a new TUN or TAP interface can be created.
-
if (isset($id) && $a_server[$id])
$vpnid = $a_server[$id]['vpnid'];
else
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index f057866..2a7055d 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -38,6 +38,9 @@ require_once("guiconfig.inc");
require_once('notices.inc');
if($_REQUEST['getupdatestatus']) {
+ if(isset($config['system']['firmware']['disablecheck'])) {
+ exit;
+ }
if(isset($config['system']['firmware']['alturl']['enable']))
$updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
else
@@ -93,9 +96,11 @@ $curcfg = $config['system']['firmware'];
(<?php echo php_uname("m"); ?>)
<br />
built on <?php readfile("/etc/version.buildtime"); ?>
- <br />
- <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div>
- <div id='updatestatus'><br/>Obtaining update status...</div>
+ <br />
+ <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div>
+ <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
+ <div id='updatestatus'><br/><?php echo gettext("Obtaining update status"); ?> ...</div>
+ <?php endif; ?>
</td>
</tr>
<?php if(!$g['hideplatform']): ?>
@@ -248,6 +253,10 @@ $curcfg = $config['system']['firmware'];
</tbody>
</table>
<script type="text/javascript">
+ function swapuname() {
+ jQuery('#uname').html("<?php echo php_uname("a"); ?>");
+ }
+ <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
function getstatus() {
scroll(0,0);
var url = "/widgets/widgets/system_information.widget.php";
@@ -265,8 +274,6 @@ $curcfg = $config['system']['firmware'];
// to avoid this we set the innerHTML property
jQuery('#updatestatus').prop('innerHTML',transport.responseText);
}
- function swapuname() {
- jQuery('#uname').html("<?php echo php_uname("a"); ?>");
- }
setTimeout('getstatus()', 4000);
+ <?php endif; ?>
</script>
OpenPOWER on IntegriCloud