diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-17 15:48:17 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-17 15:48:17 -0400 |
commit | f7f5c7bb21c94f6be6b36202a8fa301d86a66406 (patch) | |
tree | fc1909dc510d5ab95880e6050d06b3ea2b444bfc /config/snort/snort_download_updates.php | |
parent | 69e99bed09652ef93607cc353cafcc99d7e54b2e (diff) | |
download | pfsense-packages-f7f5c7bb21c94f6be6b36202a8fa301d86a66406.tar.gz pfsense-packages-f7f5c7bb21c94f6be6b36202a8fa301d86a66406.tar.bz2 pfsense-packages-f7f5c7bb21c94f6be6b36202a8fa301d86a66406.zip |
Replace exec() calls with system calls and also use unlink_if_exists().
Diffstat (limited to 'config/snort/snort_download_updates.php')
-rwxr-xr-x | config/snort/snort_download_updates.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/config/snort/snort_download_updates.php b/config/snort/snort_download_updates.php index c95f8440..9d677619 100755 --- a/config/snort/snort_download_updates.php +++ b/config/snort/snort_download_updates.php @@ -119,8 +119,7 @@ if (file_exists("{$snortdir}/{$snort_community_rules_filename}.md5") && $snortco /* Check for postback to see if we should clear the update log file. */ if (isset($_POST['clear'])) { - if (file_exists("{$snort_rules_upd_log}")) - mwexec("/bin/rm -f {$snort_rules_upd_log}"); + unlink_if_exists($snort_rules_upd_log); } if (isset($_POST['check'])) { @@ -133,12 +132,9 @@ if ($_POST['force']) { conf_mount_rw(); // Remove the existing MD5 signature files to force a download - if (file_exists("{$snortdir}/{$emergingthreats_filename}.md5")) - @unlink("{$snortdir}/{$emergingthreats_filename}.md5"); - if (file_exists("{$snortdir}/{$snort_community_rules_filename}.md5")) - @unlink("{$snortdir}/{$snort_community_rules_filename}.md5"); - if (file_exists("{$snortdir}/{$snort_rules_file}.md5")) - @unlink("{$snortdir}/{$snort_rules_file}.md5"); + unlink_if_exists("{$snortdir}/{$emergingthreats_filename}.md5"); + unlink_if_exists("{$snortdir}/{$snort_community_rules_filename}.md5"); + unlink_if_exists("{$snortdir}/{$snort_rules_file}.md5"); // Revert file system to R/O. conf_mount_ro(); |