summaryrefslogtreecommitdiffstats
path: root/usr/local/pkg
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-17 09:40:06 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-17 09:40:27 -0300
commit45438fd3fd14a76491f633bf9d34bc239cabb876 (patch)
treec202120211fdcd18a6c3d4df7a7035e2b63cd5dc /usr/local/pkg
parent76c4ff0ecf269272aad3a6f06942596d2f0ab9ff (diff)
downloadpfsense-45438fd3fd14a76491f633bf9d34bc239cabb876.zip
pfsense-45438fd3fd14a76491f633bf9d34bc239cabb876.tar.gz
Escape parameters passed to shell_exec()
Diffstat (limited to 'usr/local/pkg')
-rw-r--r--usr/local/pkg/openntpd.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/pkg/openntpd.inc b/usr/local/pkg/openntpd.inc
index c4914b8..dcbb50a 100644
--- a/usr/local/pkg/openntpd.inc
+++ b/usr/local/pkg/openntpd.inc
@@ -21,7 +21,7 @@ EOD;
function openntpd_get_iface_ip($iface) {
$iface = convert_friendly_interface_to_real_interface_name($iface);
- $line = trim(shell_exec("ifconfig $iface | grep inet | grep -v inet6"));
+ $line = trim(shell_exec("ifconfig " . escapeshellarg($iface) . " | grep inet | grep -v inet6"));
list($dummy, $ip, $dummy2, $dummy3) = explode(' ', $line);
return $ip;
OpenPOWER on IntegriCloud