diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-08-19 22:13:18 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-08-19 22:13:18 +0000 |
commit | 4b9a670cd59251ca8d194455593d73102d19c77a (patch) | |
tree | 9c5fb083806232cff5ba996ffed753c988ce5015 | |
parent | 7d04082e098fab988c9091762cad7b455bfbd95b (diff) | |
download | pfsense-4b9a670cd59251ca8d194455593d73102d19c77a.zip pfsense-4b9a670cd59251ca8d194455593d73102d19c77a.tar.gz |
Kill off pftpx helper correctly after rule deletion
-rwxr-xr-x | usr/local/www/firewall_nat.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index e3f4e10..55084bb 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -71,22 +71,22 @@ if ($_POST) { } if (isset($_POST['del_x'])) { - /* delete selected rules */ - if (is_array($_POST['rule']) && count($_POST['rule'])) { - foreach ($_POST['rule'] as $rulei) { + /* delete selected rules */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { $target = $rule['target']; - $helpers = exec("/bin/ps auwx | grep pftpx | grep {$target} | grep -v grep | cut -d\" \" -f5"); + $helpers = exec("/bin/ps awwux | grep pftpx | grep \"{$target}\" | grep -v grep | awk '{ print \$2 }'"); if($helpers) { /* kill ftp proxy helper */ mwexec("/bin/kill {$helpers}"); } - unset($a_nat[$rulei]); - } - write_config(); - touch($d_natconfdirty_path); - header("Location: firewall_nat.php"); - exit; - } + unset($a_nat[$rulei]); + } + write_config(); + touch($d_natconfdirty_path); + header("Location: firewall_nat.php"); + exit; + } } else { /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ |