summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-02-04 18:14:41 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-02-04 18:38:50 -0200
commitb3cbb077293ab439b63ef08103dfee4e066b56cd (patch)
treeb06581ef32a612707fa4ecdd8576c82fded5e151 /etc
parentaf7a83737e694cff2a8fa41147f99a8a9812ff15 (diff)
downloadpfsense-b3cbb077293ab439b63ef08103dfee4e066b56cd.zip
pfsense-b3cbb077293ab439b63ef08103dfee4e066b56cd.tar.gz
Fix some wrong escapeshellarg() calls
Conflicts: etc/inc/filter_log.inc etc/inc/pkg-utils.inc
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/ipsec.attributes.php2
-rw-r--r--etc/inc/openvpn.attributes.php2
-rw-r--r--etc/inc/pkg-utils.inc4
3 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/ipsec.attributes.php b/etc/inc/ipsec.attributes.php
index e30fc4c..ae7a85c 100644
--- a/etc/inc/ipsec.attributes.php
+++ b/etc/inc/ipsec.attributes.php
@@ -177,7 +177,7 @@ $rules = parse_cisco_acl($attributes);
if (!empty($rules)) {
$pid = posix_getpid();
@file_put_contents("/tmp/ipsec_{$pid}{$common_name}.rules", $rules);
- mwexec("/sbin/pfctl -a \"ipsec/" . escapeshellarg($common_name) . "\" -f {$g['tmp_path']}/ipsec_{$pid}" . escapeshellarg($common_name) . ".rules");
+ mwexec("/sbin/pfctl -a " . escapeshellarg("ipsec/{$common_name}") . " -f {$g['tmp_path']}/ipsec_{$pid}" . escapeshellarg($common_name) . ".rules");
@unlink("{$g['tmp_path']}/ipsec_{$pid}{$common_name}.rules");
}
diff --git a/etc/inc/openvpn.attributes.php b/etc/inc/openvpn.attributes.php
index 31ec7f5..942a8d8 100644
--- a/etc/inc/openvpn.attributes.php
+++ b/etc/inc/openvpn.attributes.php
@@ -179,7 +179,7 @@ $rules = parse_cisco_acl($attributes);
if (!empty($rules)) {
$pid = posix_getpid();
@file_put_contents("/tmp/ovpn_{$pid}{$common_name}.rules", $rules);
- mwexec("/sbin/pfctl -a \"openvpn/" . escapeshellarg($common_name) . "\" -f {$g['tmp_path']}/ovpn_{$pid}" . escapeshellarg($common_name) . ".rules");
+ mwexec("/sbin/pfctl -a " . escapeshellarg("openvpn/{$common_name}") . " -f {$g['tmp_path']}/ovpn_{$pid}" . escapeshellarg($common_name) . ".rules");
@unlink("{$g['tmp_path']}/ovpn_{$pid}{$common_name}.rules");
}
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index b727abe..59eb28d 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -279,7 +279,7 @@ function is_freebsd_pkg_installed($pkg) {
if(!$pkg)
return;
$output = "";
- exec("/usr/local/sbin/pbi_info \"" . escapeshellarg($pkg) . "\"", $output, $retval);
+ exec("/usr/local/sbin/pbi_info " . escapeshellarg($pkg), $output, $retval);
return (intval($retval) == 0);
}
@@ -861,7 +861,7 @@ function install_package_xml($pkg) {
$pkg_name_for_pbi_match = strtolower($pkg) . "-";
exec("/usr/local/sbin/pbi_info | grep '^{$pkg_name_for_pbi_match}' | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidirarray);
$pbidir0 = $pbidirarray[0];
- exec("find /usr/local/etc/ -name *.conf | grep '" . escapeshellarg($pkg) . "'",$files);
+ exec("find /usr/local/etc/ -name *.conf | grep " . escapeshellarg($pkg),$files);
foreach($files as $f) {
$pbiconf = str_replace('/usr/local',$pbidir0,$f);
if(is_file($pbiconf) || is_link($pbiconf)) {
OpenPOWER on IntegriCloud