summaryrefslogtreecommitdiffstats
path: root/etc/inc/service-utils.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-02-03 14:55:01 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-02-04 12:43:18 -0200
commit46b12609e51b9b3113abc9c22a1b0ad5a2b37d11 (patch)
tree0cadd8627871d2e8f159d093852e665a02e39777 /etc/inc/service-utils.inc
parent44f2ef9b486fc3e4e2a183ae157a86a9e8ac9018 (diff)
downloadpfsense-46b12609e51b9b3113abc9c22a1b0ad5a2b37d11.zip
pfsense-46b12609e51b9b3113abc9c22a1b0ad5a2b37d11.tar.gz
Add escapeshellarg() calls on exec parameters. While I'm here, replace some exec() calls by php functions like symlink, copy, unlink, mkdir
Conflicts: etc/inc/filter_log.inc etc/inc/interfaces.inc etc/inc/pfsense-utils.inc etc/inc/pkg-utils.inc
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r--etc/inc/service-utils.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index a1dbf31..d52abd2 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -67,7 +67,7 @@ function write_rcfile($params) {
$tokill =& $params['stop'];
} else if(!empty($params['executable'])) {
/* just nuke the executable */
- $tokill = "/usr/bin/killall {$params['executable']}";
+ $tokill = "/usr/bin/killall " . escapeshellarg($params['executable']);
} else {
/* make an educated guess (bad) */
$tokill = array_pop(explode('/', array_shift(explode(' ', $params['start']))));
OpenPOWER on IntegriCloud