summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-05-16 14:51:51 +0200
committerMichael Biebl <biebl@debian.org>2014-05-16 14:51:51 +0200
commitf1040389ccb2430b9ab2ba3209aa28a62565b721 (patch)
treec6bf609292b6f3a80754c2d01cc8855a36ac7a37
parent9374a46543e9c43c009f80def8c3b2506b0b377e (diff)
downloadrsyslog-f1040389ccb2430b9ab2ba3209aa28a62565b721.tar.gz
Imported Upstream version 8.2.1upstream/8.2.1
-rw-r--r--ChangeLog41
-rw-r--r--Makefile.am1
-rw-r--r--Makefile.in1
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure36
-rw-r--r--configure.ac9
-rw-r--r--grammar/grammar.c167
-rw-r--r--grammar/grammar.h2
-rw-r--r--grammar/grammar.y3
-rw-r--r--grammar/lexer.c216
-rw-r--r--grammar/lexer.l6
-rw-r--r--plugins/imsolaris/sun_cddl.c3
-rw-r--r--plugins/mmjsonparse/mmjsonparse.c2
-rw-r--r--plugins/mmutf8fix/mmutf8fix.c11
-rw-r--r--rsyslog-doc.tar.gzbin1260621 -> 0 bytes
-rw-r--r--runtime/msg.c20
-rw-r--r--runtime/msg.h14
-rw-r--r--runtime/prop.c6
-rw-r--r--runtime/prop.h6
-rw-r--r--runtime/typedefs.h6
-rw-r--r--runtime/unicode-helper.h2
21 files changed, 312 insertions, 243 deletions
diff --git a/ChangeLog b/ChangeLog
index fdc75b5..ae84b35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,22 @@
---------------------------------------------------------------------------
+Version 8.2.1 [v8-stable] 2014-04-17
+- permits to build against json-c 0.12
+ Unfortunately, json-c had an ABI breakage, so this is necessary. Note
+ that versions prior to 0.12 had security issues (CVE-2013-6370,
+ CVE-2013-6371) and so it is desirable to link against the new version.
+ Thanks to Thomas D. for the patch. Note that at least some distros
+ have fixed the security issue in older versions of json-c, so this
+ seems to apply mostly when building from sources.
+- doc is no longer shipped as part of the rsyslog tarball
+ Instead, the rsyslog-doc project creates its own tarball. This is the
+ result of a mailing list discussion after the 8.2.0 release with a
+ tarball-in-tarball approach, which was disliked by almost all distro
+ maintainers. This move also has the advantage of de-coupling the
+ release cycles of both projects a bit (which turned out to be a bit
+ problematic in practice).
+- bugfix: mmutf8fix did not detect two invalid sequences
+ Thanks to Axel Rau for the patch.
+---------------------------------------------------------------------------
Version 8.2.0 [v8-stable] 2014-04-02
This starts a new stable branch based on 8.1.6 plus the following changes:
- we now use doc from the rsyslog-doc project
@@ -198,6 +216,29 @@ Version 8.1.0 [experimental] 2013-11-15
statement. Also, it can still be build without problems, the option must
just explicitely be given.
---------------------------------------------------------------------------
+Version 7.6.4 [v7.6-stable] 2014-03-??
+- permits to build against json-c 0.12
+ Unfortunately, json-c had an ABI breakage, so this is necessary. Note
+ that versions prior to 0.12 had security issues (CVE-2013-6370,
+ CVE-2013-6371) and so it is desirable to link against the new version.
+ Thanks to Thomas D. for the patch. Note that at least some distros
+ have fixed the security issue in older versions of json-c, so this
+ seems to apply mostly when building from sources.
+- new omfile default module parameters
+ * filecreatemode
+ * fileowner
+ * fileownernum
+ * filegroup
+ * filegroupnum
+ * dirowner
+ * dirownernum
+ * dirgroup
+ * dirgroupnum
+ Thanks to Karol Jurak for the patch.
+- bugfix: using UUID property could cause segfault
+- bugfix: mmutf8fix did not detect two invalid sequences
+ Thanks to Axel Rau for the patch.
+---------------------------------------------------------------------------
Version 7.6.3 [v7.6-stable] 2014-03-27
- add capability to override GnuTLS path in build process
Thanks to Clayton Shotwell for the patch
diff --git a/Makefile.am b/Makefile.am
index 28ed61b..36eb83d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,7 +58,6 @@ CLEANFILES = \
endif
EXTRA_DIST = \
- rsyslog-doc.tar.gz \
platform/README \
platform/freebsd/rsyslogd \
platform/slackware/rc.rsyslogd \
diff --git a/Makefile.in b/Makefile.in
index ec7e92d..1e7758e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -593,7 +593,6 @@ pkgconfigdir = $(libdir)/pkgconfig
@HAVE_SYSTEMD_TRUE@ rsyslog.service
EXTRA_DIST = \
- rsyslog-doc.tar.gz \
platform/README \
platform/freebsd/rsyslogd \
platform/slackware/rc.rsyslogd \
diff --git a/config.h.in b/config.h.in
index caf514e..580c9b8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -161,6 +161,9 @@
/* Define to 1 if you have the <net-snmp/net-snmp-config.h> header file. */
#undef HAVE_NET_SNMP_NET_SNMP_CONFIG_H
+/* Define to 1 if the system has the type `off64_t'. */
+#undef HAVE_OFF64_T
+
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
diff --git a/configure b/configure
index fb90e73..107d9b5 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for rsyslog 8.2.0.
+# Generated by GNU Autoconf 2.69 for rsyslog 8.2.1.
#
# Report bugs to <rsyslog@lists.adiscon.com>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='rsyslog'
PACKAGE_TARNAME='rsyslog'
-PACKAGE_VERSION='8.2.0'
-PACKAGE_STRING='rsyslog 8.2.0'
+PACKAGE_VERSION='8.2.1'
+PACKAGE_STRING='rsyslog 8.2.1'
PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com'
PACKAGE_URL=''
@@ -1636,7 +1636,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures rsyslog 8.2.0 to adapt to many kinds of systems.
+\`configure' configures rsyslog 8.2.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1706,7 +1706,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of rsyslog 8.2.0:";;
+ short | recursive ) echo "Configuration of rsyslog 8.2.1:";;
esac
cat <<\_ACEOF
@@ -1964,7 +1964,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-rsyslog configure 8.2.0
+rsyslog configure 8.2.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2544,7 +2544,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by rsyslog $as_me 8.2.0, which was
+It was created by rsyslog $as_me 8.2.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3407,7 +3407,7 @@ fi
# Define the identity of the package.
PACKAGE='rsyslog'
- VERSION='8.2.0'
+ VERSION='8.2.1'
cat >>confdefs.h <<_ACEOF
@@ -5988,9 +5988,6 @@ if test "$am_t" != yes; then
fi
-if test "$GCC" = "yes"
-then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
-fi
# Check whether --enable-static was given.
if test "${enable_static+set}" = set; then :
enableval=$enable_static; p=${PACKAGE-default}
@@ -15361,6 +15358,16 @@ _ACEOF
fi
done
+ac_fn_c_check_type "$LINENO" "off64_t" "ac_cv_type_off64_t" "$ac_includes_default"
+if test "x$ac_cv_type_off64_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_OFF64_T 1
+_ACEOF
+
+
+fi
+
# getifaddrs is in libc (mostly) or in libsocket (eg Solaris 11) or not defined (eg Solaris 10)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getifaddrs" >&5
@@ -18212,6 +18219,9 @@ else
fi
RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_CFLAGS)"
+if test "$GCC" = "yes"
+then RSRT_CFLAGS="$RSRT_CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+fi
RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)"
@@ -21354,7 +21364,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by rsyslog $as_me 8.2.0, which was
+This file was extended by rsyslog $as_me 8.2.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21420,7 +21430,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-rsyslog config.status 8.2.0
+rsyslog config.status 8.2.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 689537a..5eaeb85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[8.2.0],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[8.2.1],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE([subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -22,9 +22,6 @@ AC_PROG_LEX
AC_PROG_YACC
AC_PROG_CC
AM_PROG_CC_C_O
-if test "$GCC" = "yes"
-then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
-fi
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_CANONICAL_HOST
@@ -126,6 +123,7 @@ AC_FUNC_STAT
AC_FUNC_STRERROR_R
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([flock inotify_init recvmmsg basename alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setsid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r getline malloc_trim prctl epoll_create epoll_create1 fdatasync syscall lseek64])
+AC_CHECK_TYPES([off64_t])
# getifaddrs is in libc (mostly) or in libsocket (eg Solaris 11) or not defined (eg Solaris 10)
AC_SEARCH_LIBS([getifaddrs], [socket], [AC_DEFINE(HAVE_GETIFADDRS, [1], [set define])])
@@ -855,6 +853,9 @@ if test "x$enable_rsyslogrt" = "xyes"; then
fi
AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes)
RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_CFLAGS)"
+if test "$GCC" = "yes"
+then RSRT_CFLAGS="$RSRT_CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+fi
RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)"
AC_SUBST(RSRT_CFLAGS1)
AC_SUBST(RSRT_LIBS1)
diff --git a/grammar/grammar.c b/grammar/grammar.c
index 0905c28..e28ba33 100644
--- a/grammar/grammar.c
+++ b/grammar/grammar.c
@@ -65,6 +65,7 @@
/* Line 358 of yacc.c */
#line 31 "grammar.y"
+#include "config.h"
#include <stdio.h>
#include <libestr.h>
#include "rainerscript.h"
@@ -77,7 +78,7 @@ extern int yylex(void);
extern int yyerror(char*);
/* Line 358 of yacc.c */
-#line 81 "grammar.c"
+#line 82 "grammar.c"
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
@@ -203,7 +204,7 @@ extern int yydebug;
typedef union YYSTYPE
{
/* Line 374 of yacc.c */
-#line 44 "grammar.y"
+#line 45 "grammar.y"
char *s;
long long n;
@@ -220,7 +221,7 @@ typedef union YYSTYPE
/* Line 374 of yacc.c */
-#line 224 "grammar.c"
+#line 225 "grammar.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -248,7 +249,7 @@ int yyparse ();
/* Copy the second part of user declarations. */
/* Line 377 of yacc.c */
-#line 252 "grammar.c"
+#line 253 "grammar.c"
#ifdef short
# undef short
@@ -569,14 +570,14 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 122, 122, 123, 124, 125, 126, 127, 128, 129,
- 130, 134, 138, 139, 140, 141, 142, 143, 144, 145,
- 146, 147, 148, 149, 150, 151, 155, 159, 160, 161,
- 162, 163, 164, 165, 166, 168, 169, 170, 171, 172,
- 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
- 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
- 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204
+ 0, 123, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 135, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 156, 160, 161, 162,
+ 163, 164, 165, 166, 167, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205
};
#endif
@@ -1630,49 +1631,49 @@ yyreduce:
{
case 3:
/* Line 1813 of yacc.c */
-#line 123 "grammar.y"
+#line 124 "grammar.y"
{ cnfDoObj((yyvsp[(2) - (2)].obj)); }
break;
case 4:
/* Line 1813 of yacc.c */
-#line 124 "grammar.y"
+#line 125 "grammar.y"
{ cnfDoScript((yyvsp[(2) - (2)].stmt)); }
break;
case 5:
/* Line 1813 of yacc.c */
-#line 125 "grammar.y"
+#line 126 "grammar.y"
{ cnfDoCfsysline((yyvsp[(2) - (2)].s)); }
break;
case 6:
/* Line 1813 of yacc.c */
-#line 126 "grammar.y"
+#line 127 "grammar.y"
{ cnfDoBSDTag((yyvsp[(2) - (2)].s)); }
break;
case 7:
/* Line 1813 of yacc.c */
-#line 127 "grammar.y"
+#line 128 "grammar.y"
{ cnfDoBSDHost((yyvsp[(2) - (2)].s)); }
break;
case 8:
/* Line 1813 of yacc.c */
-#line 128 "grammar.y"
+#line 129 "grammar.y"
{ (yyval.obj) = cnfobjNew((yyvsp[(1) - (3)].objType), (yyvsp[(2) - (3)].nvlst)); }
break;
case 9:
/* Line 1813 of yacc.c */
-#line 129 "grammar.y"
+#line 130 "grammar.y"
{ (yyval.obj) = cnfobjNew(CNFOBJ_TPL, (yyvsp[(2) - (3)].nvlst)); }
break;
case 10:
/* Line 1813 of yacc.c */
-#line 131 "grammar.y"
+#line 132 "grammar.y"
{ (yyval.obj) = cnfobjNew(CNFOBJ_TPL, (yyvsp[(2) - (6)].nvlst));
(yyval.obj)->subobjs = (yyvsp[(5) - (6)].objlst);
}
@@ -1680,7 +1681,7 @@ yyreduce:
case 11:
/* Line 1813 of yacc.c */
-#line 135 "grammar.y"
+#line 136 "grammar.y"
{ (yyval.obj) = cnfobjNew(CNFOBJ_RULESET, (yyvsp[(2) - (6)].nvlst));
(yyval.obj)->script = (yyvsp[(5) - (6)].stmt);
}
@@ -1688,85 +1689,85 @@ yyreduce:
case 12:
/* Line 1813 of yacc.c */
-#line 138 "grammar.y"
+#line 139 "grammar.y"
{ (yyval.objlst) = NULL; }
break;
case 13:
/* Line 1813 of yacc.c */
-#line 139 "grammar.y"
+#line 140 "grammar.y"
{ (yyval.objlst) = objlstAdd((yyvsp[(1) - (2)].objlst), (yyvsp[(2) - (2)].obj)); }
break;
case 14:
/* Line 1813 of yacc.c */
-#line 140 "grammar.y"
+#line 141 "grammar.y"
{ (yyval.objlst) = objlstAdd((yyvsp[(1) - (2)].objlst), (yyvsp[(2) - (2)].obj)); }
break;
case 15:
/* Line 1813 of yacc.c */
-#line 141 "grammar.y"
+#line 142 "grammar.y"
{ (yyval.obj) = cnfobjNew(CNFOBJ_PROPERTY, (yyvsp[(2) - (3)].nvlst)); }
break;
case 16:
/* Line 1813 of yacc.c */
-#line 142 "grammar.y"
+#line 143 "grammar.y"
{ (yyval.obj) = cnfobjNew(CNFOBJ_CONSTANT, (yyvsp[(2) - (3)].nvlst)); }
break;
case 17:
/* Line 1813 of yacc.c */
-#line 143 "grammar.y"
+#line 144 "grammar.y"
{ (yyval.nvlst) = NULL; }
break;
case 18:
/* Line 1813 of yacc.c */
-#line 144 "grammar.y"
+#line 145 "grammar.y"
{ (yyvsp[(2) - (2)].nvlst)->next = (yyvsp[(1) - (2)].nvlst); (yyval.nvlst) = (yyvsp[(2) - (2)].nvlst); }
break;
case 19:
/* Line 1813 of yacc.c */
-#line 145 "grammar.y"
+#line 146 "grammar.y"
{ (yyval.nvlst) = nvlstSetName((yyvsp[(3) - (3)].nvlst), (yyvsp[(1) - (3)].estr)); }
break;
case 20:
/* Line 1813 of yacc.c */
-#line 146 "grammar.y"
+#line 147 "grammar.y"
{ (yyval.nvlst) = nvlstNewStr((yyvsp[(1) - (1)].estr)); }
break;
case 21:
/* Line 1813 of yacc.c */
-#line 147 "grammar.y"
+#line 148 "grammar.y"
{ (yyval.nvlst) = nvlstNewArray((yyvsp[(1) - (1)].arr)); }
break;
case 22:
/* Line 1813 of yacc.c */
-#line 148 "grammar.y"
+#line 149 "grammar.y"
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); }
break;
case 23:
/* Line 1813 of yacc.c */
-#line 149 "grammar.y"
+#line 150 "grammar.y"
{ (yyval.stmt) = scriptAddStmt((yyvsp[(1) - (2)].stmt), (yyvsp[(2) - (2)].stmt)); }
break;
case 24:
/* Line 1813 of yacc.c */
-#line 150 "grammar.y"
+#line 151 "grammar.y"
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); }
break;
case 25:
/* Line 1813 of yacc.c */
-#line 151 "grammar.y"
+#line 152 "grammar.y"
{ (yyval.stmt) = cnfstmtNew(S_IF);
(yyval.stmt)->d.s_if.expr = (yyvsp[(2) - (4)].expr);
(yyval.stmt)->d.s_if.t_then = (yyvsp[(4) - (4)].stmt);
@@ -1775,7 +1776,7 @@ yyreduce:
case 26:
/* Line 1813 of yacc.c */
-#line 155 "grammar.y"
+#line 156 "grammar.y"
{ (yyval.stmt) = cnfstmtNew(S_IF);
(yyval.stmt)->d.s_if.expr = (yyvsp[(2) - (6)].expr);
(yyval.stmt)->d.s_if.t_then = (yyvsp[(4) - (6)].stmt);
@@ -1784,277 +1785,277 @@ yyreduce:
case 27:
/* Line 1813 of yacc.c */
-#line 159 "grammar.y"
+#line 160 "grammar.y"
{ (yyval.stmt) = cnfstmtNewSet((yyvsp[(2) - (5)].s), (yyvsp[(4) - (5)].expr)); }
break;
case 28:
/* Line 1813 of yacc.c */
-#line 160 "grammar.y"
+#line 161 "grammar.y"
{ (yyval.stmt) = cnfstmtNewUnset((yyvsp[(2) - (3)].s)); }
break;
case 29:
/* Line 1813 of yacc.c */
-#line 161 "grammar.y"
+#line 162 "grammar.y"
{ (yyval.stmt) = cnfstmtNewPRIFILT((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].stmt)); }
break;
case 30:
/* Line 1813 of yacc.c */
-#line 162 "grammar.y"
+#line 163 "grammar.y"
{ (yyval.stmt) = cnfstmtNewPROPFILT((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].stmt)); }
break;
case 31:
/* Line 1813 of yacc.c */
-#line 163 "grammar.y"
+#line 164 "grammar.y"
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); }
break;
case 32:
/* Line 1813 of yacc.c */
-#line 164 "grammar.y"
+#line 165 "grammar.y"
{ (yyval.stmt) = (yyvsp[(2) - (3)].stmt); }
break;
case 33:
/* Line 1813 of yacc.c */
-#line 165 "grammar.y"
+#line 166 "grammar.y"
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); }
break;
case 34:
/* Line 1813 of yacc.c */
-#line 166 "grammar.y"
+#line 167 "grammar.y"
{ (yyval.stmt) = scriptAddStmt((yyvsp[(1) - (3)].stmt), (yyvsp[(3) - (3)].stmt)); }
break;
case 35:
/* Line 1813 of yacc.c */
-#line 168 "grammar.y"
+#line 169 "grammar.y"
{ (yyval.stmt) = cnfstmtNewAct((yyvsp[(2) - (3)].nvlst)); }
break;
case 36:
/* Line 1813 of yacc.c */
-#line 169 "grammar.y"
+#line 170 "grammar.y"
{ (yyval.stmt) = cnfstmtNewLegaAct((yyvsp[(1) - (1)].s)); }
break;
case 37:
/* Line 1813 of yacc.c */
-#line 170 "grammar.y"
+#line 171 "grammar.y"
{ (yyval.stmt) = cnfstmtNew(S_STOP); }
break;
case 38:
/* Line 1813 of yacc.c */
-#line 171 "grammar.y"
+#line 172 "grammar.y"
{ (yyval.stmt) = cnfstmtNewCall((yyvsp[(2) - (2)].estr)); }
break;
case 39:
/* Line 1813 of yacc.c */
-#line 172 "grammar.y"
+#line 173 "grammar.y"
{ (yyval.stmt) = cnfstmtNewContinue(); }
break;
case 40:
/* Line 1813 of yacc.c */
-#line 173 "grammar.y"
+#line 174 "grammar.y"
{ (yyval.expr) = cnfexprNew(AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 41:
/* Line 1813 of yacc.c */
-#line 174 "grammar.y"
+#line 175 "grammar.y"
{ (yyval.expr) = cnfexprNew(OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 42:
/* Line 1813 of yacc.c */
-#line 175 "grammar.y"
+#line 176 "grammar.y"
{ (yyval.expr) = cnfexprNew(NOT, NULL, (yyvsp[(2) - (2)].expr)); }
break;
case 43:
/* Line 1813 of yacc.c */
-#line 176 "grammar.y"
+#line 177 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_EQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 44:
/* Line 1813 of yacc.c */
-#line 177 "grammar.y"
+#line 178 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_NE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 45:
/* Line 1813 of yacc.c */
-#line 178 "grammar.y"
+#line 179 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_LE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 46:
/* Line 1813 of yacc.c */
-#line 179 "grammar.y"
+#line 180 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_GE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 47:
/* Line 1813 of yacc.c */
-#line 180 "grammar.y"
+#line 181 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_LT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 48:
/* Line 1813 of yacc.c */
-#line 181 "grammar.y"
+#line 182 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_GT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 49:
/* Line 1813 of yacc.c */
-#line 182 "grammar.y"
+#line 183 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_CONTAINS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 50:
/* Line 1813 of yacc.c */
-#line 183 "grammar.y"
+#line 184 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_CONTAINSI, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 51:
/* Line 1813 of yacc.c */
-#line 184 "grammar.y"
+#line 185 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_STARTSWITH, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 52:
/* Line 1813 of yacc.c */
-#line 185 "grammar.y"
+#line 186 "grammar.y"
{ (yyval.expr) = cnfexprNew(CMP_STARTSWITHI, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 53:
/* Line 1813 of yacc.c */
-#line 186 "grammar.y"
+#line 187 "grammar.y"
{ (yyval.expr) = cnfexprNew('&', (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 54:
/* Line 1813 of yacc.c */
-#line 187 "grammar.y"
+#line 188 "grammar.y"
{ (yyval.expr) = cnfexprNew('+', (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 55:
/* Line 1813 of yacc.c */
-#line 188 "grammar.y"
+#line 189 "grammar.y"
{ (yyval.expr) = cnfexprNew('-', (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 56:
/* Line 1813 of yacc.c */
-#line 189 "grammar.y"
+#line 190 "grammar.y"
{ (yyval.expr) = cnfexprNew('*', (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 57:
/* Line 1813 of yacc.c */
-#line 190 "grammar.y"
+#line 191 "grammar.y"
{ (yyval.expr) = cnfexprNew('/', (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 58:
/* Line 1813 of yacc.c */
-#line 191 "grammar.y"
+#line 192 "grammar.y"
{ (yyval.expr) = cnfexprNew('%', (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
case 59:
/* Line 1813 of yacc.c */
-#line 192 "grammar.y"
+#line 193 "grammar.y"
{ (yyval.expr) = (yyvsp[(2) - (3)].expr); }
break;
case 60:
/* Line 1813 of yacc.c */
-#line 193 "grammar.y"
+#line 194 "grammar.y"
{ (yyval.expr) = cnfexprNew('M', NULL, (yyvsp[(2) - (2)].expr)); }
break;
case 61:
/* Line 1813 of yacc.c */
-#line 194 "grammar.y"
+#line 195 "grammar.y"
{ (yyval.expr) = (struct cnfexpr*) cnffuncNew((yyvsp[(1) - (3)].estr), NULL); }
break;
case 62:
/* Line 1813 of yacc.c */
-#line 195 "grammar.y"
+#line 196 "grammar.y"
{ (yyval.expr) = (struct cnfexpr*) cnffuncNew((yyvsp[(1) - (4)].estr), (yyvsp[(3) - (4)].fparams)); }
break;
case 63:
/* Line 1813 of yacc.c */
-#line 196 "grammar.y"
+#line 197 "grammar.y"
{ (yyval.expr) = (struct cnfexpr*) cnfnumvalNew((yyvsp[(1) - (1)].n)); }
break;
case 64:
/* Line 1813 of yacc.c */
-#line 197 "grammar.y"
+#line 198 "grammar.y"
{ (yyval.expr) = (struct cnfexpr*) cnfstringvalNew((yyvsp[(1) - (1)].estr)); }
break;
case 65:
/* Line 1813 of yacc.c */
-#line 198 "grammar.y"
+#line 199 "grammar.y"
{ (yyval.expr) = (struct cnfexpr*) cnfvarNew((yyvsp[(1) - (1)].s)); }
break;
case 66:
/* Line 1813 of yacc.c */
-#line 199 "grammar.y"
+#line 200 "grammar.y"
{ (yyval.expr) = (struct cnfexpr*) (yyvsp[(1) - (1)].arr); }
break;
case 67:
/* Line 1813 of yacc.c */
-#line 200 "grammar.y"
+#line 201 "grammar.y"
{ (yyval.fparams) = cnffparamlstNew((yyvsp[(1) - (1)].expr), NULL); }
break;
case 68:
/* Line 1813 of yacc.c */
-#line 201 "grammar.y"
+#line 202 "grammar.y"
{ (yyval.fparams) = cnffparamlstNew((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].fparams)); }
break;
case 69:
/* Line 1813 of yacc.c */
-#line 202 "grammar.y"
+#line 203 "grammar.y"
{ (yyval.arr) = (yyvsp[(2) - (3)].arr); }
break;
case 70:
/* Line 1813 of yacc.c */
-#line 203 "grammar.y"
+#line 204 "grammar.y"
{ (yyval.arr) = cnfarrayNew((yyvsp[(1) - (1)].estr)); }
break;
case 71:
/* Line 1813 of yacc.c */
-#line 204 "grammar.y"
+#line 205 "grammar.y"
{ (yyval.arr) = cnfarrayAdd((yyvsp[(1) - (3)].arr), (yyvsp[(3) - (3)].estr)); }
break;
/* Line 1813 of yacc.c */
-#line 2058 "grammar.c"
+#line 2059 "grammar.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2286,7 +2287,7 @@ yyreturn:
/* Line 2076 of yacc.c */
-#line 206 "grammar.y"
+#line 207 "grammar.y"
/*
int yyerror(char *s)
diff --git a/grammar/grammar.h b/grammar/grammar.h
index 681e15e..9ff8183 100644
--- a/grammar/grammar.h
+++ b/grammar/grammar.h
@@ -136,7 +136,7 @@ extern int yydebug;
typedef union YYSTYPE
{
/* Line 2077 of yacc.c */
-#line 44 "grammar.y"
+#line 45 "grammar.y"
char *s;
long long n;
diff --git a/grammar/grammar.y b/grammar/grammar.y
index c5bad68..a198db0 100644
--- a/grammar/grammar.y
+++ b/grammar/grammar.y
@@ -8,7 +8,7 @@
* PRI filter) are very hard to beat in ease of use, at least for simpler
* cases.
*
- * Copyright 2011-2012 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2011-2014 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -29,6 +29,7 @@
* A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
*/
%{
+#include "config.h"
#include <stdio.h>
#include <libestr.h>
#include "rainerscript.h"
diff --git a/grammar/lexer.c b/grammar/lexer.c
index eb34d2a..2c96807 100644
--- a/grammar/lexer.c
+++ b/grammar/lexer.c
@@ -1430,7 +1430,7 @@ char *yytext;
* cases. So while we hope that cfsysline support can be dropped some time in
* the future, we will probably keep these useful constructs.
*
-* Copyright 2011-2013 Rainer Gerhards and Adiscon GmbH.
+* Copyright 2011-2014 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -1450,6 +1450,8 @@ char *yytext;
* A copy of the GPL can be found in the file "COPYING" in this distribution.
* A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
*/
+#line 34 "lexer.l"
+#include "config.h"
/*%option noyywrap nodefault case-insensitive */
/* avoid compiler warning: `yyunput' defined but not used */
#define YY_NO_INPUT 1
@@ -1475,7 +1477,7 @@ char *yytext;
* wrote this ugly, but the price needed to pay in order to remain
* compatible to the previous format.
*/
-#line 63 "lexer.l"
+#line 67 "lexer.l"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1508,7 +1510,7 @@ extern int yydebug;
int fileno(FILE *stream);
#endif
-#line 1512 "lexer.c"
+#line 1514 "lexer.c"
#define INITIAL 0
#define INOBJ 1
@@ -1697,11 +1699,11 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 97 "lexer.l"
+#line 101 "lexer.l"
/* keywords */
-#line 1705 "lexer.c"
+#line 1707 "lexer.c"
if ( !(yy_init) )
{
@@ -1797,131 +1799,131 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 100 "lexer.l"
+#line 104 "lexer.l"
{ BEGIN EXPR; return IF; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 101 "lexer.l"
+#line 105 "lexer.l"
{ BEGIN INITIAL; return THEN; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 102 "lexer.l"
+#line 106 "lexer.l"
{ BEGIN INITIAL; return ';'; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 103 "lexer.l"
+#line 107 "lexer.l"
{ return OR; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 104 "lexer.l"
+#line 108 "lexer.l"
{ return AND; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 105 "lexer.l"
+#line 109 "lexer.l"
{ return NOT; }
YY_BREAK
case 7:
-#line 107 "lexer.l"
+#line 111 "lexer.l"
case 8:
-#line 108 "lexer.l"
+#line 112 "lexer.l"
case 9:
-#line 109 "lexer.l"
+#line 113 "lexer.l"
case 10:
-#line 110 "lexer.l"
+#line 114 "lexer.l"
case 11:
-#line 111 "lexer.l"
+#line 115 "lexer.l"
case 12:
-#line 112 "lexer.l"
+#line 116 "lexer.l"
case 13:
-#line 113 "lexer.l"
+#line 117 "lexer.l"
case 14:
-#line 114 "lexer.l"
+#line 118 "lexer.l"
case 15:
-#line 115 "lexer.l"
+#line 119 "lexer.l"
case 16:
-#line 116 "lexer.l"
+#line 120 "lexer.l"
case 17:
-#line 117 "lexer.l"
+#line 121 "lexer.l"
case 18:
YY_RULE_SETUP
-#line 117 "lexer.l"
+#line 121 "lexer.l"
{ return yytext[0]; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 118 "lexer.l"
+#line 122 "lexer.l"
{ return CMP_EQ; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 119 "lexer.l"
+#line 123 "lexer.l"
{ return CMP_LE; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 120 "lexer.l"
+#line 124 "lexer.l"
{ return CMP_GE; }
YY_BREAK
case 22:
-#line 122 "lexer.l"
+#line 126 "lexer.l"
case 23:
YY_RULE_SETUP
-#line 122 "lexer.l"
+#line 126 "lexer.l"
{ return CMP_NE; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 123 "lexer.l"
+#line 127 "lexer.l"
{ return CMP_LT; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 124 "lexer.l"
+#line 128 "lexer.l"
{ return CMP_GT; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 125 "lexer.l"
+#line 129 "lexer.l"
{ return CMP_CONTAINS; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 126 "lexer.l"
+#line 130 "lexer.l"
{ return CMP_CONTAINSI; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 127 "lexer.l"
+#line 131 "lexer.l"
{ return CMP_STARTSWITH; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 128 "lexer.l"
+#line 132 "lexer.l"
{ return CMP_STARTSWITHI; }
YY_BREAK
case 30:
-#line 130 "lexer.l"
+#line 134 "lexer.l"
case 31:
-#line 131 "lexer.l"
+#line 135 "lexer.l"
case 32:
YY_RULE_SETUP
-#line 131 "lexer.l"
+#line 135 "lexer.l"
{ yylval.n = strtoll(yytext, NULL, 0); return NUMBER; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 132 "lexer.l"
+#line 136 "lexer.l"
{ yylval.s = strdup(yytext+1); return VAR; }
YY_BREAK
case 34:
/* rule 34 can match eol */
YY_RULE_SETUP
-#line 133 "lexer.l"
+#line 137 "lexer.l"
{
yytext[yyleng-1] = '\0';
unescapeStr((uchar*)yytext+1, yyleng-2);
@@ -1931,7 +1933,7 @@ YY_RULE_SETUP
case 35:
/* rule 35 can match eol */
YY_RULE_SETUP
-#line 138 "lexer.l"
+#line 142 "lexer.l"
{
yytext[yyleng-1] = '\0';
unescapeStr((uchar*)yytext+1, yyleng-2);
@@ -1941,18 +1943,18 @@ YY_RULE_SETUP
case 36:
/* rule 36 can match eol */
YY_RULE_SETUP
-#line 143 "lexer.l"
+#line 147 "lexer.l"
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 144 "lexer.l"
+#line 148 "lexer.l"
{ yylval.estr = es_newStrFromCStr(yytext, yyleng);
return FUNC; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 146 "lexer.l"
+#line 150 "lexer.l"
{ parser_errmsg("invalid character '%s' in expression "
"- is there an invalid escape sequence somewhere?",
yytext); }
@@ -1960,66 +1962,66 @@ YY_RULE_SETUP
case 39:
/* rule 39 can match eol */
YY_RULE_SETUP
-#line 149 "lexer.l"
+#line 153 "lexer.l"
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 150 "lexer.l"
+#line 154 "lexer.l"
{ parser_errmsg("invalid character '%s' in 'call' statement"
"- is there an invalid escape sequence somewhere?",
yytext); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 153 "lexer.l"
+#line 157 "lexer.l"
{ yylval.estr = es_newStrFromCStr(yytext, yyleng);
BEGIN INITIAL;
return NAME; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 156 "lexer.l"
+#line 160 "lexer.l"
{ return '&'; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 157 "lexer.l"
+#line 161 "lexer.l"
{ return '{'; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 158 "lexer.l"
+#line 162 "lexer.l"
{ return '}'; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 159 "lexer.l"
+#line 163 "lexer.l"
{ return STOP; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 160 "lexer.l"
+#line 164 "lexer.l"
{ return ELSE; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 161 "lexer.l"
+#line 165 "lexer.l"
{ BEGIN INCALL; return CALL; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 162 "lexer.l"
+#line 166 "lexer.l"
{ BEGIN EXPR; return SET; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 163 "lexer.l"
+#line 167 "lexer.l"
{ BEGIN EXPR; return UNSET; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 164 "lexer.l"
+#line 168 "lexer.l"
{ return CONTINUE; }
YY_BREAK
/* line number support because the "preprocessor" combines lines and so needs
@@ -2027,23 +2029,23 @@ YY_RULE_SETUP
*/
case 51:
YY_RULE_SETUP
-#line 168 "lexer.l"
+#line 172 "lexer.l"
{ BEGIN LINENO; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 169 "lexer.l"
+#line 173 "lexer.l"
{ yylineno = atoi(yytext) - 1; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 170 "lexer.l"
+#line 174 "lexer.l"
{ BEGIN INITIAL; }
YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
-#line 171 "lexer.l"
+#line 175 "lexer.l"
YY_BREAK
/* $IncludeConfig must be detected as part of CFSYSLINE, because this is
@@ -2052,12 +2054,12 @@ YY_RULE_SETUP
case 55:
/* rule 55 can match eol */
YY_RULE_SETUP
-#line 175 "lexer.l"
+#line 179 "lexer.l"
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 176 "lexer.l"
+#line 180 "lexer.l"
{ if(cnfDoInclude(yytext) != 0)
yyterminate();
BEGIN INITIAL; }
@@ -2065,76 +2067,76 @@ YY_RULE_SETUP
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 179 "lexer.l"
+#line 183 "lexer.l"
{ yylval.objType = CNFOBJ_MAINQ;
BEGIN INOBJ; return BEGINOBJ; }
YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
-#line 181 "lexer.l"
+#line 185 "lexer.l"
{ yylval.objType = CNFOBJ_GLOBAL;
BEGIN INOBJ; return BEGINOBJ; }
YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
-#line 183 "lexer.l"
+#line 187 "lexer.l"
{ yylval.objType = CNFOBJ_TPL;
BEGIN INOBJ; return BEGIN_TPL; }
YY_BREAK
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
-#line 185 "lexer.l"
+#line 189 "lexer.l"
{ yylval.objType = CNFOBJ_RULESET;
BEGIN INOBJ; return BEGIN_RULESET; }
YY_BREAK
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
-#line 187 "lexer.l"
+#line 191 "lexer.l"
{ yylval.objType = CNFOBJ_PROPERTY;
BEGIN INOBJ; return BEGIN_PROPERTY; }
YY_BREAK
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
-#line 189 "lexer.l"
+#line 193 "lexer.l"
{ yylval.objType = CNFOBJ_CONSTANT;
BEGIN INOBJ; return BEGIN_CONSTANT; }
YY_BREAK
case 63:
/* rule 63 can match eol */
YY_RULE_SETUP
-#line 191 "lexer.l"
+#line 195 "lexer.l"
{ yylval.objType = CNFOBJ_INPUT;
BEGIN INOBJ; return BEGINOBJ; }
YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 193 "lexer.l"
+#line 197 "lexer.l"
{ yylval.objType = CNFOBJ_MODULE;
BEGIN INOBJ; return BEGINOBJ; }
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 195 "lexer.l"
+#line 199 "lexer.l"
{ yylval.objType = CNFOBJ_LOOKUP_TABLE;
BEGIN INOBJ; return BEGINOBJ; }
YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
-#line 197 "lexer.l"
+#line 201 "lexer.l"
{ BEGIN INOBJ; return BEGIN_ACTION; }
YY_BREAK
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
-#line 198 "lexer.l"
+#line 202 "lexer.l"
{
yylval.s = strdup(rmLeadingSpace(yytext));
dbgprintf("lexer: propfilt is '%s'\n", yylval.s);
@@ -2143,57 +2145,57 @@ YY_RULE_SETUP
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 203 "lexer.l"
+#line 207 "lexer.l"
{ yylval.s = strdup(rmLeadingSpace(yytext)); return PRIFILT; }
YY_BREAK
case 69:
-#line 205 "lexer.l"
+#line 209 "lexer.l"
case 70:
-#line 206 "lexer.l"
+#line 210 "lexer.l"
case 71:
/* rule 71 can match eol */
-#line 207 "lexer.l"
+#line 211 "lexer.l"
case 72:
/* rule 72 can match eol */
-#line 208 "lexer.l"
+#line 212 "lexer.l"
case 73:
/* rule 73 can match eol */
-#line 209 "lexer.l"
+#line 213 "lexer.l"
case 74:
/* rule 74 can match eol */
-#line 210 "lexer.l"
+#line 214 "lexer.l"
case 75:
/* rule 75 can match eol */
YY_RULE_SETUP
-#line 210 "lexer.l"
+#line 214 "lexer.l"
{ yylval.s = yytext; return LEGACY_ACTION; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 211 "lexer.l"
+#line 215 "lexer.l"
{ BEGIN INITIAL; return ENDOBJ; }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 212 "lexer.l"
+#line 216 "lexer.l"
{ yylval.estr = es_newStrFromCStr(yytext, yyleng);
return NAME; }
YY_BREAK
case 78:
-#line 215 "lexer.l"
+#line 219 "lexer.l"
case 79:
-#line 216 "lexer.l"
+#line 220 "lexer.l"
case 80:
-#line 217 "lexer.l"
+#line 221 "lexer.l"
case 81:
YY_RULE_SETUP
-#line 217 "lexer.l"
+#line 221 "lexer.l"
{ return(yytext[0]); }
YY_BREAK
case 82:
/* rule 82 can match eol */
YY_RULE_SETUP
-#line 218 "lexer.l"
+#line 222 "lexer.l"
{
yytext[yyleng-1] = '\0';
unescapeStr((uchar*)yytext+1, yyleng-2);
@@ -2204,28 +2206,28 @@ YY_RULE_SETUP
return VALUE; }*/
case 83:
YY_RULE_SETUP
-#line 225 "lexer.l"
+#line 229 "lexer.l"
{ preCommentState = YY_START; BEGIN COMMENT; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 226 "lexer.l"
+#line 230 "lexer.l"
{ preCommentState = YY_START; BEGIN COMMENT; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 227 "lexer.l"
+#line 231 "lexer.l"
{ preCommentState = YY_START; BEGIN COMMENT; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 228 "lexer.l"
+#line 232 "lexer.l"
{ BEGIN preCommentState; }
YY_BREAK
case 87:
/* rule 87 can match eol */
YY_RULE_SETUP
-#line 229 "lexer.l"
+#line 233 "lexer.l"
YY_BREAK
case 88:
@@ -2233,18 +2235,18 @@ case 88:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 230 "lexer.l"
+#line 234 "lexer.l"
/* skip comments in input */
YY_BREAK
case 89:
/* rule 89 can match eol */
YY_RULE_SETUP
-#line 231 "lexer.l"
+#line 235 "lexer.l"
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 232 "lexer.l"
+#line 236 "lexer.l"
{ parser_errmsg("invalid character '%s' in object definition "
"- is there an invalid escape sequence somewhere?",
yytext); }
@@ -2254,7 +2256,7 @@ case 91:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 235 "lexer.l"
+#line 239 "lexer.l"
{ /* see comment on $IncludeConfig above */
if(!strncasecmp(yytext, "$includeconfig ", 14)) {
yyless(14);
@@ -2272,7 +2274,7 @@ case 92:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 246 "lexer.l"
+#line 250 "lexer.l"
{ yylval.s = strdup(yytext); return BSD_TAG_SELECTOR; }
YY_BREAK
case 93:
@@ -2281,7 +2283,7 @@ case 93:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 247 "lexer.l"
+#line 251 "lexer.l"
{ yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; }
YY_BREAK
case 94:
@@ -2290,7 +2292,7 @@ case 94:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 248 "lexer.l"
+#line 252 "lexer.l"
{ yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; }
YY_BREAK
case 95:
@@ -2298,24 +2300,24 @@ case 95:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 249 "lexer.l"
+#line 253 "lexer.l"
{ yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; }
YY_BREAK
case 96:
/* rule 96 can match eol */
YY_RULE_SETUP
-#line 250 "lexer.l"
+#line 254 "lexer.l"
/* skip comments in input */
YY_BREAK
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
-#line 251 "lexer.l"
+#line 255 "lexer.l"
/* drop whitespace */
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 252 "lexer.l"
+#line 256 "lexer.l"
{ parser_errmsg("invalid character '%s' "
"- is there an invalid escape sequence somewhere?",
yytext); }
@@ -2327,15 +2329,15 @@ case YY_STATE_EOF(INCL):
case YY_STATE_EOF(LINENO):
case YY_STATE_EOF(INCALL):
case YY_STATE_EOF(EXPR):
-#line 255 "lexer.l"
+#line 259 "lexer.l"
{ if(popfile() != 0) yyterminate(); }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 257 "lexer.l"
+#line 261 "lexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 2339 "lexer.c"
+#line 2341 "lexer.c"
case YY_END_OF_BUFFER:
{
@@ -3300,7 +3302,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 257 "lexer.l"
+#line 261 "lexer.l"
int
diff --git a/grammar/lexer.l b/grammar/lexer.l
index 7fdb68a..d264d6e 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -9,7 +9,7 @@
* cases. So while we hope that cfsysline support can be dropped some time in
* the future, we will probably keep these useful constructs.
*
- * Copyright 2011-2013 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2011-2014 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -30,6 +30,10 @@
* A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
*/
+%{
+#include "config.h"
+%}
+
%option noyywrap nodefault case-insensitive yylineno
/*%option noyywrap nodefault case-insensitive */
diff --git a/plugins/imsolaris/sun_cddl.c b/plugins/imsolaris/sun_cddl.c
index 6d49c8b..e7f3fa7 100644
--- a/plugins/imsolaris/sun_cddl.c
+++ b/plugins/imsolaris/sun_cddl.c
@@ -18,7 +18,7 @@
*
* CDDL HEADER END
*/
-/* Portions Copyright 2010 by Rainer Gerhards and Adiscon
+/* Portions Copyright 2010-2014 by Rainer Gerhards and Adiscon
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
@@ -39,6 +39,7 @@
* software developed by the University of California, Berkeley, and its
* contributors.
*/
+#include "config.h"
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c
index 9c0ab88..9e9f3d9 100644
--- a/plugins/mmjsonparse/mmjsonparse.c
+++ b/plugins/mmjsonparse/mmjsonparse.c
@@ -160,7 +160,7 @@ processJSON(wrkrInstanceData_t *pWrkrData, msg_t *pMsg, char *buf, size_t lenBuf
err = pWrkrData->tokener->err;
if(err != json_tokener_continue)
- errMsg = json_tokener_errors[err];
+ errMsg = json_tokener_error_desc(err);
else
errMsg = "Unterminated input";
} else if((size_t)pWrkrData->tokener->char_offset < lenBuf)
diff --git a/plugins/mmutf8fix/mmutf8fix.c b/plugins/mmutf8fix/mmutf8fix.c
index 351bb12..e529686 100644
--- a/plugins/mmutf8fix/mmutf8fix.c
+++ b/plugins/mmutf8fix/mmutf8fix.c
@@ -254,9 +254,14 @@ doUTF8(instanceData *pData, uchar *msg, int lenMsg)
; /* nothing to do, all well */
} else if((c & 0xe0) == 0xc0) {
/* 2-byte sequence */
- strtIdx = i;
- seqLen = bytesLeft = 1;
- codepoint = c & 0x1f;
+ /* 0xc0 and 0xc1 are illegal */
+ if(c == 0xc0 || c == 0xc1) {
+ msg[i] = pData->replChar;
+ } else {
+ strtIdx = i;
+ seqLen = bytesLeft = 1;
+ codepoint = c & 0x1f;
+ }
} else if((c & 0xf0) == 0xe0) {
/* 3-byte sequence */
strtIdx = i;
diff --git a/rsyslog-doc.tar.gz b/rsyslog-doc.tar.gz
deleted file mode 100644
index e03aea3..0000000
--- a/rsyslog-doc.tar.gz
+++ /dev/null
Binary files differ
diff --git a/runtime/msg.c b/runtime/msg.c
index 2959796..ded8cfe 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -7,7 +7,7 @@
* of the "old" message code without any modifications. However, it
* helps to have things at the right place one we go to the meat of it.
*
- * Copyright 2007-2013 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2014 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -1418,7 +1418,7 @@ static void msgSetUUID(msg_t * const pM)
uuid_t uuid;
static pthread_mutex_t mutUUID = PTHREAD_MUTEX_INITIALIZER;
- dbgprintf("[MsgSetUUID] START\n");
+ dbgprintf("[MsgSetUUID] START, lenRes %llu\n", (long long unsigned) lenRes);
assert(pM != NULL);
if((pM->pszUUID = (uchar*) MALLOC(lenRes)) == NULL) {
@@ -1432,8 +1432,8 @@ static void msgSetUUID(msg_t * const pM)
pM->pszUUID[byte_nbr * 2 + 1] = hex_char[uuid [byte_nbr] & 15];
}
+ pM->pszUUID[lenRes-1] = '\0';
dbgprintf("[MsgSetUUID] UUID : %s LEN: %d \n", pM->pszUUID, (int)lenRes);
- pM->pszUUID[lenRes] = '\0';
}
dbgprintf("[MsgSetUUID] END\n");
}
@@ -1794,7 +1794,7 @@ MsgSetAfterPRIOffs(msg_t * const pMsg, short offs)
* which already obtained the lock. So in general, this function here must
* only be called when it it safe to do so without it aquiring a lock.
*/
-rsRetVal MsgSetAPPNAME(msg_t * const pMsg, char* pszAPPNAME)
+rsRetVal MsgSetAPPNAME(msg_t *__restrict__ const pMsg, const char* pszAPPNAME)
{
DEFiRet;
assert(pMsg != NULL);
@@ -1812,7 +1812,7 @@ finalize_it:
/* rgerhards 2004-11-24: set PROCID in msg object
*/
-rsRetVal MsgSetPROCID(msg_t * const pMsg, char* pszPROCID)
+rsRetVal MsgSetPROCID(msg_t *__restrict__ const pMsg, const char* pszPROCID)
{
DEFiRet;
ISOBJ_TYPE_assert(pMsg, msg);
@@ -1881,7 +1881,7 @@ char *getPROCID(msg_t * const pM, sbool bLockMutex)
/* rgerhards 2004-11-24: set MSGID in msg object
*/
-rsRetVal MsgSetMSGID(msg_t * const pMsg, char* pszMSGID)
+rsRetVal MsgSetMSGID(msg_t * const pMsg, const char* pszMSGID)
{
DEFiRet;
ISOBJ_TYPE_assert(pMsg, msg);
@@ -1941,7 +1941,7 @@ void MsgSetRuleset(msg_t * const pMsg, ruleset_t *pRuleset)
/* set TAG in msg object
* (rewritten 2009-06-18 rgerhards)
*/
-void MsgSetTAG(msg_t * const pMsg, uchar* pszBuf, size_t lenBuf)
+void MsgSetTAG(msg_t *__restrict__ const pMsg, const uchar* pszBuf, const size_t lenBuf)
{
uchar *pBuf;
assert(pMsg != NULL);
@@ -2084,7 +2084,7 @@ uchar *getRcvFrom(msg_t * const pM)
/* rgerhards 2004-11-24: set STRUCTURED DATA in msg object
*/
-rsRetVal MsgSetStructuredData(msg_t * const pMsg, char* pszStrucData)
+rsRetVal MsgSetStructuredData(msg_t * const pMsg, const char* pszStrucData)
{
DEFiRet;
ISOBJ_TYPE_assert(pMsg, msg);
@@ -2264,7 +2264,7 @@ void MsgSetRcvFrom(msg_t *pThis, prop_t *new)
* name (but it works only for the immediate previous).
* rgerhards, 2009-06-31
*/
-void MsgSetRcvFromStr(msg_t *pThis, uchar *psz, int len, prop_t **ppProp)
+void MsgSetRcvFromStr(msg_t * const pThis, const uchar *psz, const int len, prop_t **ppProp)
{
assert(pThis != NULL);
assert(ppProp != NULL);
@@ -2299,7 +2299,7 @@ rsRetVal MsgSetRcvFromIP(msg_t *pThis, prop_t *new)
* name (but it works only for the immediate previous).
* rgerhards, 2009-06-31
*/
-rsRetVal MsgSetRcvFromIPStr(msg_t *pThis, uchar *psz, int len, prop_t **ppProp)
+rsRetVal MsgSetRcvFromIPStr(msg_t *const pThis, const uchar *psz, const int len, prop_t **ppProp)
{
DEFiRet;
assert(pThis != NULL);
diff --git a/runtime/msg.h b/runtime/msg.h
index a2392a2..2d3e995 100644
--- a/runtime/msg.h
+++ b/runtime/msg.h
@@ -162,21 +162,21 @@ msg_t *MsgAddRef(msg_t *pM);
void setProtocolVersion(msg_t *pM, int iNewVersion);
void MsgSetInputName(msg_t *pMsg, prop_t*);
void MsgSetDfltTZ(msg_t *pThis, char *tz);
-rsRetVal MsgSetAPPNAME(msg_t *pMsg, char* pszAPPNAME);
-rsRetVal MsgSetPROCID(msg_t *pMsg, char* pszPROCID);
-rsRetVal MsgSetMSGID(msg_t *pMsg, char* pszMSGID);
+rsRetVal MsgSetAPPNAME(msg_t *pMsg, const char* pszAPPNAME);
+rsRetVal MsgSetPROCID(msg_t *pMsg, const char* pszPROCID);
+rsRetVal MsgSetMSGID(msg_t *pMsg, const char* pszMSGID);
void MsgSetParseSuccess(msg_t *pMsg, int bSuccess);
-void MsgSetTAG(msg_t *pMsg, uchar* pszBuf, size_t lenBuf);
+void MsgSetTAG(msg_t *pMsg, const uchar* pszBuf, const size_t lenBuf);
void MsgSetRuleset(msg_t *pMsg, ruleset_t*);
rsRetVal MsgSetFlowControlType(msg_t *pMsg, flowControl_t eFlowCtl);
-rsRetVal MsgSetStructuredData(msg_t *pMsg, char* pszStrucData);
+rsRetVal MsgSetStructuredData(msg_t *const pMsg, const char* pszStrucData);
rsRetVal MsgAddToStructuredData(msg_t *pMsg, uchar *toadd, rs_size_t len);
void MsgGetStructuredData(msg_t *pM, uchar **pBuf, rs_size_t *len);
rsRetVal msgSetFromSockinfo(msg_t *pThis, struct sockaddr_storage *sa);
void MsgSetRcvFrom(msg_t *pMsg, prop_t*);
-void MsgSetRcvFromStr(msg_t *pMsg, uchar* pszRcvFrom, int, prop_t **);
+void MsgSetRcvFromStr(msg_t *const pMsg, const uchar* pszRcvFrom, const int, prop_t **);
rsRetVal MsgSetRcvFromIP(msg_t *pMsg, prop_t*);
-rsRetVal MsgSetRcvFromIPStr(msg_t *pThis, uchar *psz, int len, prop_t **ppProp);
+rsRetVal MsgSetRcvFromIPStr(msg_t *const pThis, const uchar *psz, const int len, prop_t **ppProp);
void MsgSetHOSTNAME(msg_t *pMsg, uchar* pszHOSTNAME, int lenHOSTNAME);
rsRetVal MsgSetAfterPRIOffs(msg_t *pMsg, short offs);
void MsgSetMSGoffs(msg_t *pMsg, short offs);
diff --git a/runtime/prop.c b/runtime/prop.c
index cb89fac..fa067bd 100644
--- a/runtime/prop.c
+++ b/runtime/prop.c
@@ -73,7 +73,7 @@ ENDobjDestruct(prop)
/* set string, we make our own private copy! This MUST only be called BEFORE
* ConstructFinalize()!
*/
-static rsRetVal SetString(prop_t *pThis, uchar *psz, int len)
+static rsRetVal SetString(prop_t *pThis, const uchar *psz, const int len)
{
DEFiRet;
ISOBJ_TYPE_assert(pThis, prop);
@@ -142,7 +142,7 @@ static rsRetVal AddRef(prop_t *pThis)
* convenience, it is alos (very, very) slightly faster.
* rgerhards, 2009-07-01
*/
-static rsRetVal CreateStringProp(prop_t **ppThis, uchar* psz, int len)
+static rsRetVal CreateStringProp(prop_t **ppThis, const uchar* psz, const int len)
{
DEFiRet;
propConstruct(ppThis);
@@ -161,7 +161,7 @@ static rsRetVal CreateStringProp(prop_t **ppThis, uchar* psz, int len)
* existing property).
* rgerhards, 2009-07-01
*/
-rsRetVal CreateOrReuseStringProp(prop_t **ppThis, uchar *psz, int len)
+rsRetVal CreateOrReuseStringProp(prop_t **ppThis, const uchar *psz, const int len)
{
uchar *pszPrev;
int lenPrev;
diff --git a/runtime/prop.h b/runtime/prop.h
index c7564e6..7cb2743 100644
--- a/runtime/prop.h
+++ b/runtime/prop.h
@@ -42,12 +42,12 @@ BEGINinterface(prop) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Construct)(prop_t **ppThis);
rsRetVal (*ConstructFinalize)(prop_t *pThis);
rsRetVal (*Destruct)(prop_t **ppThis);
- rsRetVal (*SetString)(prop_t *pThis, uchar* psz, int len);
+ rsRetVal (*SetString)(prop_t *pThis, const uchar* psz, const int len);
rsRetVal (*GetString)(prop_t *pThis, uchar** ppsz, int *plen);
int (*GetStringLen)(prop_t *pThis);
rsRetVal (*AddRef)(prop_t *pThis);
- rsRetVal (*CreateStringProp)(prop_t **ppThis, uchar* psz, int len);
- rsRetVal (*CreateOrReuseStringProp)(prop_t **ppThis, uchar *psz, int len);
+ rsRetVal (*CreateStringProp)(prop_t **ppThis, const uchar* psz, const int len);
+ rsRetVal (*CreateOrReuseStringProp)(prop_t **ppThis, const uchar *psz, const int len);
ENDinterface(prop)
#define propCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
diff --git a/runtime/typedefs.h b/runtime/typedefs.h
index 8d206f6..d604538 100644
--- a/runtime/typedefs.h
+++ b/runtime/typedefs.h
@@ -3,7 +3,7 @@
*
* Begun 2010-11-25 RGerhards
*
- * Copyright (C) 2005-2013 by Rainer Gerhards and Adiscon GmbH
+ * Copyright (C) 2005-2014 by Rainer Gerhards and Adiscon GmbH
*
* This file is part of the rsyslog runtime library.
*
@@ -158,7 +158,9 @@ typedef enum {
} fiop_t;
#ifndef HAVE_LSEEK64
- typedef off_t off64_t;
+# ifndef HAVE_OFF64_T
+ typedef off_t off64_t;
+# endif
#endif
diff --git a/runtime/unicode-helper.h b/runtime/unicode-helper.h
index ed06d24..6337701 100644
--- a/runtime/unicode-helper.h
+++ b/runtime/unicode-helper.h
@@ -50,7 +50,7 @@
static inline int ustrcmp(const uchar *psz1, const uchar *psz2)
{
- return strcmp((char*) psz1, (char*) psz2);
+ return strcmp((const char*) psz1, (const char*) psz2);
}
static inline int ustrlen(const uchar *psz)