From 71802285e56dfed514be715b4ab2d01a0b4363b8 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 24 Jul 2014 17:05:33 -0300 Subject: Replace exec() and system() calls by internal functions --- usr/local/www/firewall_shaper_wizards.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr/local/www/firewall_shaper_wizards.php b/usr/local/www/firewall_shaper_wizards.php index e6b67ff..54ead11 100644 --- a/usr/local/www/firewall_shaper_wizards.php +++ b/usr/local/www/firewall_shaper_wizards.php @@ -43,9 +43,10 @@ require("guiconfig.inc"); require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); +require_once("util.inc"); if($_GET['reset'] <> "") { - mwexec("/usr/bin/killall -9 pfctl"); + sigkillbyname('pfctl', SIGKILL); exit; } @@ -62,8 +63,8 @@ if ($_POST['apply']) { $savemsg = $retval; /* reset rrd queues */ - system("rm -f /var/db/rrd/*queuedrops.rrd"); - system("rm -f /var/db/rrd/*queues.rrd"); + unlink_if_exists("/var/db/rrd/*queuedrops.rrd"); + unlink_if_exists("/var/db/rrd/*queues.rrd"); enable_rrd_graphing(); clear_subsystem_dirty('shaper'); -- cgit v1.1