aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-17 21:22:15 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-17 21:22:15 -0400
commit3321f53eb16bb7db6522ee571a1df97e2045c82d (patch)
treee149fdb4f7e70238a1c828d6c9c629442aa12cba /config/snort
parent557b481600002561242fd8bca999905b391001e5 (diff)
downloadpfsense-packages-3321f53eb16bb7db6522ee571a1df97e2045c82d.tar.gz
pfsense-packages-3321f53eb16bb7db6522ee571a1df97e2045c82d.tar.bz2
pfsense-packages-3321f53eb16bb7db6522ee571a1df97e2045c82d.zip
Replace PHP unlink() with pfSense unlink_if_exists().
Diffstat (limited to 'config/snort')
-rwxr-xr-xconfig/snort/snort_check_for_rule_updates.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php
index ebd1fd53..e801f5fd 100755
--- a/config/snort/snort_check_for_rule_updates.php
+++ b/config/snort/snort_check_for_rule_updates.php
@@ -120,7 +120,7 @@ if ($etpro == "on") {
$emergingthreats = "on";
$et_name = "Emerging Threats Pro";
$et_md5_remove = ET_DNLD_FILENAME . ".md5";
- @unlink("{$snortdir}/{$et_md5_remove}");
+ unlink_if_exists("{$snortdir}/{$et_md5_remove}");
}
else {
$emergingthreats_filename = ET_DNLD_FILENAME;
@@ -131,7 +131,7 @@ else {
$emergingthreats_url .= "snort-" . ET_VERSION . "/";
$et_name = "Emerging Threats Open";
$et_md5_remove = ETPRO_DNLD_FILENAME . ".md5";
- @unlink("{$snortdir}/{$et_md5_remove}");
+ unlink_if_exists("{$snortdir}/{$et_md5_remove}");
}
/* Snort GPLv2 Community Rules filenames and URL */
@@ -423,7 +423,7 @@ safe_mkdir("{$snortiprepdir}");
/* See if we need to automatically clear the Update Log based on 1024K size limit */
if (file_exists($snort_rules_upd_log)) {
if (1048576 < filesize($snort_rules_upd_log))
- @unlink("{$snort_rules_upd_log}");
+ unlink_if_exists("{$snort_rules_upd_log}");
}
/* Log start time for this rules update */