mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 05:50:41 +01:00
Merge branch 'v7-stable'
This commit is contained in:
commit
b69e45aaaa
21
ChangeLog
21
ChangeLog
@ -64,6 +64,10 @@ Version 7.3.0 [devel] 2012-10-09
|
||||
This is controlled by the new action parameter "VeryReliableZip".
|
||||
----------------------------------------------------------------------------
|
||||
Version 7.2.2 [v7-stable] 2012-10-??
|
||||
- enabled to build without libuuid, at loss of uuid functionality
|
||||
this enables smoother builds on older systems that do not support
|
||||
libuuid. Loss of functionality should usually not matter too much as
|
||||
uuid support has only recently been added and is very seldom used.
|
||||
- bugfix: omfwd did not properly support "template" parameter
|
||||
- bugfix: potential segfault when re_match() function was used
|
||||
Thanks to oxpa for the patch.
|
||||
@ -75,6 +79,18 @@ Version 7.2.2 [v7-stable] 2012-10-??
|
||||
- bugfix: leading quote (") in string-type template() lead to thight loop
|
||||
on startup
|
||||
- bugfix: no error msg on invalid field option in legacy/string template
|
||||
- bugfix: potential segfault due to invalid param handling in comparisons
|
||||
This could happen in RainerScript comparisons (like contains); in some
|
||||
cases an unitialized variable was accessed, which could lead to an
|
||||
invalid free and in turn to a segfault.
|
||||
Closes: http://bugzilla.adiscon.com/show_bug.cgi?id=372
|
||||
Thanks to Georgi Georgiev for reporting this bug and his great help
|
||||
in solving it.
|
||||
- bugfix: no error msg on unreadable $IncludeConfig path
|
||||
- bugfix: $IncludeConfig did not correctly process directories
|
||||
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=376
|
||||
The testbench was also enhanced to check for these cases.
|
||||
Thanks to Georgi Georgiev for the bug report.
|
||||
----------------------------------------------------------------------------
|
||||
Version 7.2.1 [v7-stable] 2012-10-29
|
||||
- bugfix: ruleset()-object did only support a single statement
|
||||
@ -237,6 +253,11 @@ Version 6.6.1 [v6-stable] 2012-10-??
|
||||
This did not affect users, but could have caused trouble in the future
|
||||
for developers.
|
||||
- bugfix: no error msg on invalid field option in legacy/string template
|
||||
- bugfix: no error msg on unreadable $IncludeConfig path
|
||||
- bugfix: $IncludeConfig did not correctly process directories
|
||||
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=376
|
||||
The testbench was also enhanced to check for these cases.
|
||||
Thanks to Georgi Georgiev for the bug report.
|
||||
---------------------------------------------------------------------------
|
||||
Version 6.6.0 [v6-stable] 2012-10-22
|
||||
This starts a new stable branch, based on the 6.5.x series, plus:
|
||||
|
||||
40
configure.ac
40
configure.ac
@ -35,7 +35,6 @@ PKG_PROG_PKG_CONFIG
|
||||
PKG_CHECK_MODULES(LIBESTR, libestr >= 0.1.2)
|
||||
PKG_CHECK_MODULES(LIBEE, libee >= 0.4.0)
|
||||
PKG_CHECK_MODULES([JSON_C], [json])
|
||||
PKG_CHECK_MODULES([LIBUUID], [uuid])
|
||||
|
||||
case "${host}" in
|
||||
*-*-linux*)
|
||||
@ -342,27 +341,6 @@ AC_ARG_ENABLE(kmsg,
|
||||
AM_CONDITIONAL(ENABLE_IMKMSG, test x$enable_kmsg = xyes)
|
||||
|
||||
|
||||
#
|
||||
# SYSLOG_UNIXAF
|
||||
#
|
||||
AC_MSG_CHECKING(for SYSLOG_UNIXAF support)
|
||||
AC_ARG_ENABLE([unix],
|
||||
[AS_HELP_STRING([--disable-unix], [Disable support for unix])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SYSLOG_UNIXAF], [1], [Description])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
],
|
||||
[
|
||||
# enabled by default
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SYSLOG_UNIXAF], [1], [Description])
|
||||
])
|
||||
|
||||
|
||||
# inet
|
||||
AC_ARG_ENABLE(inet,
|
||||
[AS_HELP_STRING([--enable-inet],[Enable networking support @<:@default=yes@:>@])],
|
||||
@ -729,6 +707,23 @@ AC_SUBST(SNMP_CFLAGS)
|
||||
AC_SUBST(SNMP_LIBS)
|
||||
|
||||
|
||||
# uuid support
|
||||
AC_ARG_ENABLE(uuid,
|
||||
[AS_HELP_STRING([--enable-uuid],[Enable support for uuid generation @<:@default=yes@:>@])],
|
||||
[case "${enableval}" in
|
||||
yes) enable_elasticsearch="yes" ;;
|
||||
no) enable_elasticsearch="no" ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-uuid) ;;
|
||||
esac],
|
||||
[enable_uuid=yes]
|
||||
)
|
||||
if test "x$enable_elasticsearch" = "xyes"; then
|
||||
PKG_CHECK_MODULES([LIBUUID], [uuid])
|
||||
AC_DEFINE(USE_LIBUUID, 1, [Define if you want to enable libuuid support])
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_UUID, test x$enable_uuid = xyes)
|
||||
|
||||
|
||||
# elasticsearch support
|
||||
AC_ARG_ENABLE(elasticsearch,
|
||||
[AS_HELP_STRING([--enable-elasticsearch],[Enable elasticsearch output module @<:@default=no@:>@])],
|
||||
@ -1365,6 +1360,7 @@ echo " rsyslog runtime will be built: $enable_rsyslogrt"
|
||||
echo " rsyslogd will be built: $enable_rsyslogd"
|
||||
echo " GUI components will be built: $enable_gui"
|
||||
echo " Unlimited select() support enabled: $enable_unlimited_select"
|
||||
echo " uuid support enabled: $enable_uuid"
|
||||
echo
|
||||
echo "---{ input plugins }---"
|
||||
echo " Klog functionality enabled: $enable_klog ($os_type)"
|
||||
|
||||
@ -1230,7 +1230,7 @@ evalStrArrayCmp(es_str_t *estr_l, struct cnfarray* ar, int cmpop)
|
||||
|
||||
#define FREE_TWO_STRINGS \
|
||||
if(bMustFree) es_deleteStr(estr_r); \
|
||||
if(expr->r->nodetype != 'A' && r.datatype == 'S') es_deleteStr(r.d.estr); \
|
||||
if(expr->r->nodetype != 'S' && expr->r->nodetype != 'A' && r.datatype == 'S') es_deleteStr(r.d.estr); \
|
||||
if(bMustFree2) es_deleteStr(estr_l); \
|
||||
if(l.datatype == 'S') es_deleteStr(l.d.estr)
|
||||
|
||||
@ -2761,24 +2761,29 @@ int
|
||||
cnfDoInclude(char *name)
|
||||
{
|
||||
char *cfgFile;
|
||||
char *finalName;
|
||||
unsigned i;
|
||||
int result;
|
||||
glob_t cfgFiles;
|
||||
struct stat fileInfo;
|
||||
char nameBuf[MAXFNAME+1];
|
||||
|
||||
/* Use GLOB_MARK to append a trailing slash for directories.
|
||||
* Required by doIncludeDirectory().
|
||||
*/
|
||||
result = glob(name, GLOB_MARK, NULL, &cfgFiles);
|
||||
if(result == GLOB_NOSPACE || result == GLOB_ABORTED) {
|
||||
#if 0
|
||||
finalName = name;
|
||||
if(stat(name, &fileInfo) == 0) {
|
||||
/* stat usually fails if we have a wildcard - so this does NOT indicate error! */
|
||||
if(S_ISDIR(fileInfo.st_mode)) {
|
||||
/* if we have a directory, we need to add "*" to get its files */
|
||||
snprintf(nameBuf, sizeof(nameBuf), "%s*", name);
|
||||
finalName = nameBuf;
|
||||
}
|
||||
}
|
||||
/* Use GLOB_MARK to append a trailing slash for directories. */
|
||||
result = glob(finalName, GLOB_MARK, NULL, &cfgFiles);
|
||||
if(result == GLOB_NOSPACE || result == GLOB_ABORTED || cfgFiles.gl_pathc == 0) {
|
||||
char errStr[1024];
|
||||
rs_strerror_r(errno, errStr, sizeof(errStr));
|
||||
errmsg.LogError(0, RS_RET_FILE_NOT_FOUND, "error accessing config file or directory '%s': %s",
|
||||
pattern, errStr);
|
||||
ABORT_FINALIZE(RS_RET_FILE_NOT_FOUND);
|
||||
#endif
|
||||
dbgprintf("includeconfig glob error %d\n", errno);
|
||||
parser_errmsg("error accessing config file or directory '%s': %s",
|
||||
finalName, errStr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -2792,11 +2797,8 @@ cnfDoInclude(char *name)
|
||||
dbgprintf("requested to include config file '%s'\n", cfgFile);
|
||||
cnfSetLexFile(cfgFile);
|
||||
} else if(S_ISDIR(fileInfo.st_mode)) { /* config directory */
|
||||
if(strcmp(name, cfgFile)) {
|
||||
/* do not include ourselves! */
|
||||
dbgprintf("requested to include directory '%s'\n", cfgFile);
|
||||
cnfDoInclude(cfgFile);
|
||||
}
|
||||
dbgprintf("requested to include directory '%s'\n", cfgFile);
|
||||
cnfDoInclude(cfgFile);
|
||||
} else {
|
||||
dbgprintf("warning: unable to process IncludeConfig directive '%s'\n", cfgFile);
|
||||
}
|
||||
|
||||
@ -45,7 +45,9 @@
|
||||
#if HAVE_MALLOC_H
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
#include <uuid/uuid.h>
|
||||
#ifdef USE_LIBUUID
|
||||
#include <uuid/uuid.h>
|
||||
#endif
|
||||
#include "rsyslog.h"
|
||||
#include "srUtils.h"
|
||||
#include "stringbuf.h"
|
||||
@ -559,8 +561,10 @@ propNameStrToID(uchar *pName, propid_t *pPropID)
|
||||
*pPropID = PROP_MSGID;
|
||||
} else if(!strcmp((char*) pName, "parsesuccess")) {
|
||||
*pPropID = PROP_PARSESUCCESS;
|
||||
#ifdef USE_LIBUUID
|
||||
} else if(!strcmp((char*) pName, "uuid")) {
|
||||
*pPropID = PROP_UUID;
|
||||
#endif
|
||||
/* here start system properties (those, that do not relate to the message itself */
|
||||
} else if(!strcmp((char*) pName, "$now")) {
|
||||
*pPropID = PROP_SYS_NOW;
|
||||
@ -1450,6 +1454,7 @@ char *getProtocolVersionString(msg_t *pM)
|
||||
return(pM->iProtocolVersion ? "1" : "0");
|
||||
}
|
||||
|
||||
#ifdef USE_LIBUUID
|
||||
/* note: libuuid seems not to be thread-safe, so we need
|
||||
* to get some safeguards in place.
|
||||
*/
|
||||
@ -1504,6 +1509,7 @@ void getUUID(msg_t *pM, uchar **pBuf, int *piLen)
|
||||
}
|
||||
dbgprintf("[getUUID] END\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
getRawMsg(msg_t *pM, uchar **pBuf, int *piLen)
|
||||
@ -2970,9 +2976,11 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
|
||||
case PROP_MSGID:
|
||||
pRes = (uchar*)getMSGID(pMsg);
|
||||
break;
|
||||
#ifdef USE_LIBUUID
|
||||
case PROP_UUID:
|
||||
getUUID(pMsg, &pRes, &bufLen);
|
||||
break;
|
||||
#endif
|
||||
case PROP_PARSESUCCESS:
|
||||
pRes = (uchar*)getParseSuccess(pMsg);
|
||||
break;
|
||||
|
||||
@ -73,6 +73,9 @@ TESTS += \
|
||||
rscript_ruleset_call.sh \
|
||||
cee_simple.sh \
|
||||
cee_diskqueue.sh \
|
||||
incltest.sh \
|
||||
incltest_dir.sh \
|
||||
incltest_dir_wildcard.sh \
|
||||
linkedlistqueue.sh
|
||||
|
||||
if HAVE_VALGRIND
|
||||
@ -291,6 +294,13 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
|
||||
testsuites/cee_simple.conf \
|
||||
cee_diskqueue.sh \
|
||||
testsuites/cee_diskqueue.conf \
|
||||
incltest.sh \
|
||||
testsuites/incltest.conf \
|
||||
incltest_dir.sh \
|
||||
testsuites/incltest_dir.conf \
|
||||
incltest_dir_wildcard.sh \
|
||||
testsuites/incltest_dir_wildcard.conf \
|
||||
testsuites/incltest.d/include.conf \
|
||||
linkedlistqueue.sh \
|
||||
testsuites/linkedlistqueue.conf \
|
||||
da-mainmsg-q.sh \
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
#valgrind="valgrind --tool=helgrind --log-fd=1"
|
||||
#valgrind="valgrind --tool=exp-ptrcheck --log-fd=1"
|
||||
#set -o xtrace
|
||||
#export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
|
||||
#export RSYSLOG_DEBUGLOG="log"
|
||||
export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
|
||||
export RSYSLOG_DEBUGLOG="log"
|
||||
case $1 in
|
||||
'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
|
||||
cp $srcdir/testsuites/diag-common.conf diag-common.conf
|
||||
|
||||
11
tests/incltest.sh
Executable file
11
tests/incltest.sh
Executable file
@ -0,0 +1,11 @@
|
||||
echo ===============================================================================
|
||||
echo \[incltest.sh\]: test $IncludeConfig for specific file
|
||||
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup incltest.conf
|
||||
# 100 messages are enough - the question is if the include is read ;)
|
||||
source $srcdir/diag.sh injectmsg 0 100
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown
|
||||
source $srcdir/diag.sh seq-check 0 99
|
||||
source $srcdir/diag.sh exit
|
||||
11
tests/incltest_dir.sh
Executable file
11
tests/incltest_dir.sh
Executable file
@ -0,0 +1,11 @@
|
||||
echo ===============================================================================
|
||||
echo \[incltest_dir.sh\]: test $IncludeConfig for directories
|
||||
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup incltest_dir.conf
|
||||
# 100 messages are enough - the question is if the include is read ;)
|
||||
source $srcdir/diag.sh injectmsg 0 100
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown
|
||||
source $srcdir/diag.sh seq-check 0 99
|
||||
source $srcdir/diag.sh exit
|
||||
11
tests/incltest_dir_wildcard.sh
Executable file
11
tests/incltest_dir_wildcard.sh
Executable file
@ -0,0 +1,11 @@
|
||||
echo ===============================================================================
|
||||
echo \[incltest_dir_wildcard.sh\]: test $IncludeConfig for directories with wildcards
|
||||
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup incltest_dir_wildcard.conf
|
||||
# 100 messages are enough - the question is if the include is read ;)
|
||||
source $srcdir/diag.sh injectmsg 0 100
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown
|
||||
source $srcdir/diag.sh seq-check 0 99
|
||||
source $srcdir/diag.sh exit
|
||||
5
tests/testsuites/incltest.conf
Normal file
5
tests/testsuites/incltest.conf
Normal file
@ -0,0 +1,5 @@
|
||||
# see .sh file for description
|
||||
# rgerhards, 2009-11-30
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
$IncludeConfig testsuites/incltest.d/include.conf
|
||||
2
tests/testsuites/incltest.d/include.conf
Normal file
2
tests/testsuites/incltest.d/include.conf
Normal file
@ -0,0 +1,2 @@
|
||||
$template outfmt,"%msg:F,58:2%\n"
|
||||
:msg, contains, "msgnum:" ./rsyslog.out.log;outfmt
|
||||
5
tests/testsuites/incltest_dir.conf
Normal file
5
tests/testsuites/incltest_dir.conf
Normal file
@ -0,0 +1,5 @@
|
||||
# see .sh file for description
|
||||
# rgerhards, 2009-11-30
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
$IncludeConfig testsuites/incltest.d/
|
||||
5
tests/testsuites/incltest_dir_wildcard.conf
Normal file
5
tests/testsuites/incltest_dir_wildcard.conf
Normal file
@ -0,0 +1,5 @@
|
||||
# see .sh file for description
|
||||
# rgerhards, 2009-11-30
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
$IncludeConfig testsuites/incltest.d/*.conf
|
||||
@ -1339,6 +1339,11 @@ static void printVersion(void)
|
||||
printf("\tRuntime Instrumentation (slow code):\tYes\n");
|
||||
#else
|
||||
printf("\tRuntime Instrumentation (slow code):\tNo\n");
|
||||
#endif
|
||||
#ifdef USE_LIBUUID
|
||||
printf("\tuuid support:\t\t\t\tYes\n");
|
||||
#else
|
||||
printf("\tuuid support:\t\t\t\tNo\n");
|
||||
#endif
|
||||
printf("\nSee http://www.rsyslog.com for more information.\n");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user