From 1a62cd67866048dc3df68765494c907611a2aebf Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 9 Feb 2009 15:50:18 -0500 Subject: Set max_execution_time --- config/snort/snort.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 4173b813..c5c11d0e 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -29,6 +29,10 @@ */ require_once("pfsense-utils.inc"); +/* Allow additional execution time 0 = no limit. */ +ini_set('max_execution_time', '9999'); +ini_set('max_input_time', '9999'); + /* define oinkid */ if($config['installedpackages']['snort']) $oinkid = $config['installedpackages']['snort']['config'][0]['oinkmastercode']; @@ -627,7 +631,14 @@ function extract_snort_rules_md5($tmpfname) { $static_output = gettext("Extracting snort rules..."); update_all_status($static_output); } - exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C /usr/local/etc/snort/"); + $cmd = "/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C /usr/local/etc/snort/"; + /* extract item and show status during extraction */ + $handle = popen('$cmd 2>&1', 'r'); + while(!feof($handle)) { + $read = fread($handle, 2096); + update_output_window($read); + } + pclose($handle); if(!$console_mode) { $static_output = gettext("Snort rules extracted."); update_all_status($static_output); -- cgit v1.2.3