]> git.pld-linux.org Git - packages/syslog-ng.git/commitdiff
- fix for syslog facility
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 16 Jan 2009 13:50:54 +0000 (13:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    syslog-ng-fixes.patch -> 1.2

syslog-ng-fixes.patch

index df228c5de817b465d2d0cb573c8c697c4cc0c56f..1279fc79bacb85e573f7b6926c612a36cdb9ffef 100644 (file)
@@ -9,3 +9,58 @@
      return FALSE;
      
    pw = getpwnam(user);
+commit 11f8d45b016107a686dbfa29497960ae3f6145ac
+Author: Balazs Scheidler <bazsi@balabit.hu>
+Date:   Fri Jan 16 14:44:53 2009 +0100
+
+    [config parser] "syslog" became a reserved word, make it possible to use that as a facility name
+    
+       In syslog-ng 3.0, "syslog" became a reserved word, thus the facility()
+       filter couldn't use it as name for the facility named syslog.
+    
+       To avoid having to quote this word, I added a kludge to the
+       config grammar, to make it recognize syslog as a facility name
+       based on context.
+
+diff --git a/src/cfg-grammar.y b/src/cfg-grammar.y
+index c40b7fb..d54ba8f 100644
+--- a/src/cfg-grammar.y
++++ b/src/cfg-grammar.y
+@@ -277,6 +277,7 @@ cfg_check_template(LogTemplate *template)
+ %type <cptr> string
+ %type <cptr> string_or_number
++%type <cptr> facility_string
+ %type   <ptr> string_list
+ %type   <ptr> string_list_build
+@@ -464,7 +465,7 @@ source_affile_option
+               affile_sd_set_pri_level(last_driver, level); 
+             free($3);
+           }
+-        | KW_FACILITY '(' string ')'    
++        | KW_FACILITY '(' facility_string ')'
+           {
+             int facility = -1;
+@@ -1305,7 +1306,7 @@ filter_fac_list
+       ;
+ filter_fac
+-      : string                                
++      : facility_string
+         { 
+           int n = syslog_name_lookup_facility_by_name($1);
+           if (n == -1)
+@@ -1499,6 +1500,11 @@ string_list_build
+         |                                     { $$ = NULL; }
+         ;
++facility_string
++        : string                                { $$ = $1; };
++        | KW_SYSLOG                             { $$ = strdup("syslog"); }
++        ;
++
+ %%
+ extern int linenum;
This page took 0.040132 seconds and 4 git commands to generate.