Skip to content

Commit

Permalink
Restrict regex to only consider files to rotate, and ignore other par…
Browse files Browse the repository at this point in the history
…ams like key_file and cert_file. Fixes #3292
  • Loading branch information
rbgarga committed Nov 1, 2013
1 parent 5e20654 commit c030cf2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/syslog-ng/syslog-ng.inc
Expand Up @@ -235,7 +235,7 @@ function syslogng_get_log_files($objects) {

foreach($objects as $object) {
if($object['objecttype'] == 'destination') {
preg_match("/file\(['\"]([^'\"]*)['\"]/", base64_decode($object['objectparameters']), $match);
preg_match("/\bfile\b\(['\"]([^'\"]*)['\"]/", base64_decode($object['objectparameters']), $match);
if($match) {
$log_file = $match[1];
array_push($log_files, $log_file);
Expand Down Expand Up @@ -433,4 +433,4 @@ EOD;
conf_mount_rw();
write_rcfile($rc);
}
?>
?>
2 changes: 1 addition & 1 deletion pkg_config.8.xml
Expand Up @@ -1887,7 +1887,7 @@
<website>http://www.balabit.com/network-security/syslog-ng/</website>
<descr>Syslog-ng syslog server. This service is not intended to replace the default pfSense syslog server but rather acts as an independent syslog server.</descr>
<category>Services</category>
<version>3.3.6_2</version>
<version>3.3.6_3</version>
<status>ALPHA</status>
<required_version>2.1</required_version>
<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
Expand Down
2 changes: 1 addition & 1 deletion pkg_config.8.xml.amd64
Expand Up @@ -1874,7 +1874,7 @@
<website>http://www.balabit.com/network-security/syslog-ng/</website>
<descr>Syslog-ng syslog server. This service is not intended to replace the default pfSense syslog server but rather acts as an independent syslog server.</descr>
<category>Services</category>
<version>3.3.6_2</version>
<version>3.3.6_3</version>
<status>ALPHA</status>
<required_version>2.1</required_version>
<depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
Expand Down

0 comments on commit c030cf2

Please sign in to comment.