diff --git a/syslog-ng/syslog-ng-lib.pl b/syslog-ng/syslog-ng-lib.pl index c0fa58fdf..9b2c835e7 100755 --- a/syslog-ng/syslog-ng-lib.pl +++ b/syslog-ng/syslog-ng-lib.pl @@ -46,7 +46,7 @@ for(my $lnum=0; $lnum<@$lref; $lnum++) { $line =~ s/#.*$//g; # Remove hash comment $line =~ s/\/\/.*$//g if ($line !~ /".*\/\/.*"/); $line =~ s/\/\*.*\*\///g; # Remove multi-line comment - if ($line =~ /^\@include\s+"(.*)"/) { + if ($line =~ /^\@include\s+"([^"]+)"/) { # Found an include .. replace with contents of the file(s) local $incs = $1; if ($incs !~ /^\//) { diff --git a/syslog/syslog-lib.pl b/syslog/syslog-lib.pl index 10f46a4ed..67b673abe 100755 --- a/syslog/syslog-lib.pl +++ b/syslog/syslog-lib.pl @@ -36,7 +36,8 @@ foreach my $line (@lines) { last if ($line !~ s/\\$//); } } - if ($line =~ /^\$IncludeConfig\s+(\S+)/) { + if ($line =~ /^\$IncludeConfig\s+(\S+)/ || + $line =~ /^include\(file="([^"]+)"/) { # rsyslog include statement .. follow the money foreach my $icfile (glob($1)) { my $ic = &get_config($icfile);