aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_check_for_rule_updates.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-20 17:46:01 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:04:36 -0500
commitb1d0505eef8c0d30e20adb2d514f7f135acc5e9d (patch)
tree60985ac2e147213240d7caeab373394e148ea21d /config/suricata/suricata_check_for_rule_updates.php
parent0e9009d3aa39885e03b826a263e0fc2047e324a7 (diff)
downloadpfsense-packages-b1d0505eef8c0d30e20adb2d514f7f135acc5e9d.tar.gz
pfsense-packages-b1d0505eef8c0d30e20adb2d514f7f135acc5e9d.tar.bz2
pfsense-packages-b1d0505eef8c0d30e20adb2d514f7f135acc5e9d.zip
Replace '/bin/rm' calls with rmdir_recursive() function.
Diffstat (limited to 'config/suricata/suricata_check_for_rule_updates.php')
-rw-r--r--config/suricata/suricata_check_for_rule_updates.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/suricata/suricata_check_for_rule_updates.php b/config/suricata/suricata_check_for_rule_updates.php
index 065825b6..b38ebf3d 100644
--- a/config/suricata/suricata_check_for_rule_updates.php
+++ b/config/suricata/suricata_check_for_rule_updates.php
@@ -405,7 +405,7 @@ function suricata_fetch_new_rules($file_url, $file_dst, $file_md5, $desc = "") {
/* remove old $tmpfname files if present */
if (is_dir("{$tmpfname}"))
- exec("/bin/rm -r {$tmpfname}");
+ rmdir_recursive("{$tmpfname}");
/* Make sure required suricatadirs exsist */
exec("/bin/mkdir -p {$suricatadir}rules");
@@ -415,7 +415,7 @@ exec("/bin/mkdir -p {$suricatalogdir}");
/* See if we need to automatically clear the Update Log based on 1024K size limit */
if (file_exists($suricata_rules_upd_log)) {
if (1048576 < filesize($suricata_rules_upd_log))
- exec("/bin/rm -r {$suricata_rules_upd_log}");
+ unlink_if_exists("{$suricata_rules_upd_log}");
}
/* Log start time for this rules update */
@@ -753,7 +753,7 @@ if (is_dir("{$tmpfname}")) {
update_status(gettext("Cleaning up after rules extraction..."));
update_output_window(gettext("Removing {$tmpfname} directory..."));
}
- exec("/bin/rm -r {$tmpfname}");
+ rmdir_recursive("{$tmpfname}");
}
if ($pkg_interface <> "console") {