1 --- syslog-ng-3.0.1/src/misc.c~ 2008-11-05 20:57:42.000000000 +0100
2 +++ syslog-ng-3.0.1/src/misc.c 2009-01-16 11:43:30.896633603 +0100
12 commit 11f8d45b016107a686dbfa29497960ae3f6145ac
13 Author: Balazs Scheidler <bazsi@balabit.hu>
14 Date: Fri Jan 16 14:44:53 2009 +0100
16 [config parser] "syslog" became a reserved word, make it possible to use that as a facility name
18 In syslog-ng 3.0, "syslog" became a reserved word, thus the facility()
19 filter couldn't use it as name for the facility named syslog.
21 To avoid having to quote this word, I added a kludge to the
22 config grammar, to make it recognize syslog as a facility name
25 diff --git a/src/cfg-grammar.y b/src/cfg-grammar.y
26 index c40b7fb..d54ba8f 100644
27 --- a/src/cfg-grammar.y
28 +++ b/src/cfg-grammar.y
29 @@ -277,6 +277,7 @@ cfg_check_template(LogTemplate *template)
32 %type <cptr> string_or_number
33 +%type <cptr> facility_string
34 %type <ptr> string_list
35 %type <ptr> string_list_build
37 @@ -464,7 +465,7 @@ source_affile_option
38 affile_sd_set_pri_level(last_driver, level);
41 - | KW_FACILITY '(' string ')'
42 + | KW_FACILITY '(' facility_string ')'
46 @@ -1305,7 +1306,7 @@ filter_fac_list
53 int n = syslog_name_lookup_facility_by_name($1);
55 @@ -1499,6 +1500,11 @@ string_list_build
60 + : string { $$ = $1; };
61 + | KW_SYSLOG { $$ = strdup("syslog"); }