summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-06-18 17:24:05 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-06-18 17:24:05 -0300
commit8f8fa997758ff4a4a90d79904f768b981ef5a5e2 (patch)
treef97dc777095a979174967d287f605c34daca607a /usr/local
parent5bd7a1f796dc72c56a552f5ecaf4a44bad92368c (diff)
parentfb0f242b1e33023aef42e48b5749e72634c32d06 (diff)
downloadpfsense-8f8fa997758ff4a4a90d79904f768b981ef5a5e2.zip
pfsense-8f8fa997758ff4a4a90d79904f768b981ef5a5e2.tar.gz
Merge remote branch 'mainline/master'
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/firewall_nat.php36
-rw-r--r--usr/local/www/system_advanced_admin.php2
2 files changed, 32 insertions, 6 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index 0c9229b..84fc0e8 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -82,6 +82,19 @@ if ($_POST) {
}
}
+if ($_GET['act'] == "del") {
+ if ($a_nat[$_GET['id']]) {
+ if (isset($a_nat[$_GET['id']]['associated-rule-id'])) {
+ delete_id($a_nat[$_GET['id']]['associated-rule-id'], $config['filter']['rule']);
+ }
+ unset($a_nat[$_GET['id']]);
+ write_config();
+ mark_subsystem_dirty('nat');
+ header("Location: firewall_nat.php");
+ exit;
+ }
+}
+
if (isset($_POST['del_x'])) {
/* delete selected rules */
if (is_array($_POST['rule']) && count($_POST['rule'])) {
@@ -195,7 +208,13 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td width="17"></td>
+ <td width="17">
+ <?php if (count($a_nat) == 0): ?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0">
+ <?php else: ?>
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')">
+ <?php endif; ?>
+ </td>
<td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
@@ -293,10 +312,11 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td valign="middle" class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
+ <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
<td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit rule"></a></td>
</tr>
<tr>
- <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
+ <td align="center" valign="middle"><a href="firewall_nat.php?act=del&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
<td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new nat based on this one" width="17" height="17" border="0"></a></td>
</tr>
</table>
@@ -310,11 +330,17 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php endif; ?></td>
- <td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" border="0"><?php endif; ?></td>
</tr>
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?><input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected mappings" onclick="return confirm('Do you really want to delete the selected mappings?')"><?php endif; ?></td>
+ <td width="17">
+ <?php if (count($a_nat) == 0): ?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0">
+ <?php else: ?>
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')">
+ <?php endif; ?>
+ </td>
+ <td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index 6f7a077..ca4cee3 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -412,7 +412,7 @@ function prot_change() {
<?php
if ($restart_sshd) {
- mwexec("/usr/bin/killall sshd");
+ killbyname(sshd);
log_error(gettext("secure shell configuration has changed. Stopping sshd."));
if ($config['system']['enablesshd']) {
OpenPOWER on IntegriCloud