Browse Source

New upstream version 8.24.0

upstream upstream/8.24.0
Michael Biebl 6 years ago
parent
commit
7d8a835f73
  1. 2
      .tarball-version
  2. 2
      CONTRIBUTING.md
  3. 81
      ChangeLog
  4. 13
      Makefile.am
  5. 103
      Makefile.in
  6. 36
      action.c
  7. 4
      action.h
  8. 264
      compat/getifaddrs.c
  9. 10
      compat/ifaddrs.h
  10. 6
      config.h.in
  11. 218
      configure
  12. 106
      configure.ac
  13. 3
      contrib/imczmq/imczmq.c
  14. 2
      contrib/imkmsg/imkmsg.c
  15. 6
      contrib/imzmq3/README
  16. 2
      contrib/imzmq3/imzmq3.c
  17. 5
      contrib/mmcount/mmcount.c
  18. 8
      contrib/mmdblookup/Makefile.am
  19. 749
      contrib/mmdblookup/Makefile.in
  20. 389
      contrib/mmdblookup/mmdblookup.c
  21. 10
      contrib/mmgrok/mmgrok.c
  22. 8
      contrib/mmrfc5424addhmac/mmrfc5424addhmac.c
  23. 4
      contrib/mmsequence/mmsequence.c
  24. 83
      contrib/omczmq/README
  25. 172
      contrib/omczmq/omczmq.c
  26. 6
      contrib/omzmq3/README
  27. 5
      dirty.h
  28. 871
      grammar/grammar.c
  29. 126
      grammar/grammar.h
  30. 6
      grammar/grammar.y
  31. 1992
      grammar/lexer.c
  32. 6
      grammar/lexer.l
  33. 71
      grammar/rainerscript.c
  34. 20
      grammar/rainerscript.h
  35. 3
      plugins/imdiag/imdiag.c
  36. 12
      plugins/imfile/imfile.c
  37. 47
      plugins/imjournal/imjournal.c
  38. 3
      plugins/imklog/imklog.c
  39. 3
      plugins/impstats/impstats.c
  40. 8
      plugins/imptcp/imptcp.c
  41. 2
      plugins/imrelp/imrelp.c
  42. 2
      plugins/imsolaris/imsolaris.c
  43. 34
      plugins/imudp/imudp.c
  44. 20
      plugins/imuxsock/imuxsock.c
  45. 4
      plugins/mmanon/mmanon.c
  46. 4
      plugins/mmaudit/mmaudit.c
  47. 14
      plugins/mmexternal/mmexternal.c
  48. 6
      plugins/mmfields/mmfields.c
  49. 6
      plugins/mmjsonparse/mmjsonparse.c
  50. 4
      plugins/mmnormalize/mmnormalize.c
  51. 6
      plugins/mmpstrucdata/mmpstrucdata.c
  52. 8
      plugins/mmrm1stspace/Makefile.am
  53. 750
      plugins/mmrm1stspace/Makefile.in
  54. 191
      plugins/mmrm1stspace/mmrm1stspace.c
  55. 4
      plugins/mmsnmptrapd/mmsnmptrapd.c
  56. 4
      plugins/mmutf8fix/mmutf8fix.c
  57. 12
      plugins/omelasticsearch/omelasticsearch.c
  58. 4
      plugins/omjournal/omjournal.c
  59. 8
      plugins/ommongodb/ommongodb.c
  60. 4
      plugins/omruleset/omruleset.c
  61. 2
      plugins/omudpspoof/omudpspoof.c
  62. 6
      plugins/pmciscoios/pmciscoios.c
  63. 8
      plugins/pmnull/Makefile.am
  64. 749
      plugins/pmnull/Makefile.in
  65. 191
      plugins/pmnull/pmnull.c
  66. 5
      runtime/batch.h
  67. 20
      runtime/datetime.c
  68. 8
      runtime/debug.c
  69. 2
      runtime/hashtable.c
  70. 26
      runtime/librsksi.c
  71. 14
      runtime/librsksi.h
  72. 32
      runtime/lmsig_ksi.c
  73. 2
      runtime/lookup.c
  74. 10
      runtime/module-template.h
  75. 23
      runtime/modules.c
  76. 8
      runtime/modules.h
  77. 268
      runtime/msg.c
  78. 120
      runtime/msg.h
  79. 71
      runtime/net.c
  80. 5
      runtime/net.h
  81. 4
      runtime/netstrm.c
  82. 5
      runtime/netstrm.h
  83. 5
      runtime/nsd.h
  84. 4
      runtime/nsd_gtls.c
  85. 21
      runtime/nsd_ptcp.c
  86. 3
      runtime/obj-types.h
  87. 8
      runtime/parser.c
  88. 4
      runtime/parser.h
  89. 49
      runtime/queue.c
  90. 8
      runtime/queue.h
  91. 14
      runtime/ratelimit.c
  92. 6
      runtime/ratelimit.h
  93. 5
      runtime/rsyslog.c
  94. 18
      runtime/rsyslog.h
  95. 94
      runtime/ruleset.c
  96. 2
      runtime/ruleset.h
  97. 7
      runtime/sd-daemon.c
  98. 4
      runtime/srutils.c
  99. 6
      runtime/strmsrv.c
  100. 4
      runtime/tcps_sess.c

2
.tarball-version

@ -1 +1 @@
8.23.0
8.24.0

2
CONTRIBUTING.md

@ -119,7 +119,7 @@ a single) platform.
Note that we always try to merge with the most recent master branch and
try a build from that version (if automatic merging is possible). If this
test fails but no other, chances are good that there is an inter-PR issue.
If this happens, it is suggested to rebase to get master branch and update
If this happens, it is suggested to rebase to git master branch and update
the PR.
Note to developers

81
ChangeLog

@ -1,4 +1,85 @@
------------------------------------------------------------------------------
Version 8.24.0 [v8-stable] 2017-01-10
- rsyslog now builds on AIX
see also: https://github.com/rsyslog/rsyslog/pull/1247
Thanks to github user purnimam1 and the team at IBM
Note: the rsyslog project has no AIX platform to ensure that future versions
will remain buildable on AIX. If you would like to contribute ressources,
please contact the rsyslog team.
- mmdblookup: new maxminddb lookup message modify plugin
Thanks to 饶琛琳 (github user chenryn) for the contribution
- mmrm1stspace: new module; removes first space in MSG if present
- KSI signature provider: file permissions can now be specified
This happens via parameters equal to those used by omfile itself.
Note that KSI files can have different permissions/owner than the log
files themself.
Thanks to Allan Park for the patch.
- omzmq: new features
Thanks to Brian Knox for the patch.
- change: when the hostname is empty, we now use "localhost-empty-hostname"
In 8.23.0, "localhost" was used in this case, but that could be misleading.
The new name makes the error condition (gethostname() should always return
a non-empty name) more obvious.
- omelasticsearch: remove "asyncrepl" config parameter
The _bulk index endpoint on ElasticSearch 5.0 no longer
ignores the ?replication=async query parameter. It was deprecated
since 1.5 and silently ignored in 2.x but passing it to a 5.x
instance breaks omeleastisearch with a 400 response.
closes https://github.com/rsyslog/rsyslog/issues/1250
- omfwd: Add support for bind-to-device (see below on same for imudp)
- imudp: Add support for bind-to-device
Add support for bind-to-device option to omfwd and imudp modules.
Configured using device="name". Only new syntax format is supported.
e.g.,
input(type="imudp" port=["10514"] device="eth0" name="udp")
Action(type="omfwd" Target="192.168.1.23" Port="10514" Device="eth0")
see also https://github.com/rsyslog/rsyslog/pull/1261
Thanks to David Ahern for the patch.
- imudp: limit rcvbufsize parameter to max 1GiB
- rainerscript: implement new "call_indirect" statement
- bugfix imjournal: make state file handling more robust
There is a bug in rsyslog which is caused by not very atomic writes of
imjournal statefile. It's hardly reproducible but there is a way.
fscanf error appears only when rsyslog reads an empty statefile which
causes that imjournal is stopped so no logging from journal is
performed. When the statefile contains random bytes error appears
again but from journal and imjournal is stopped too.
In this patch Rsyslog writes imjournal statefile more atomically and
secure. Reading the statefile is more robust and doesn't affect
imjournal module so when corrupted statefile is read imjournal
ignores statefile, continues with logging and it doesn't stop. Logger
can be used as a test if it's logging or not.
Patch introduces a new option with both old and new config format
"IgnoreNonValidStateFile" which is "on" by default and it can turn
off ignorance of non valid statefile.
Thanks to github user tomassykora for the patch.
- bugfix core: lookup table reload was not properly integrated
The opcode was not handled, what lead to misleading messages
in debug log. Since we run debug builds more strictly, it also
causes an assertion to trigger, thus aborting the test
- bugfix core: potential dealock on shutdown
could happen when rsyslog was started and quickly shut down OR when
co-incidently a new thread was spawend "with bad timing" around the time
of shutdown.
See also https://github.com/rsyslog/rsyslog/pull/1274
Thanks to github user tomassykora for the final patch and Rado Sroka for
the analysis and an initial patch.
- bugfix ommongodb: did not work in v8 due to invalid indirection
Thanks to Benoit Dolez for the patch.
- bugfix ommongodb: fix tryResume handling
To make tryResume working, the connection to mongodb need to be closed.
Thus close it on "insert error".
Thanks to Benoit Dolez for the patch.
- bugfix omfwd: retry processing was not done correctly, could stall
see also https://github.com/rsyslog/rsyslog/pull/1261
Thanks to David Ahern for the patch.
- bugfix imuxsock: segfault non shutdown when $OmitLocalLogging is on
Imuxsock tries to close socket on index 0 which ends with segfault.
Thanks to Tomas Sykora for the patch.
- testbench:
* empty-hostname test did not work correctly
* improve debugging by better output
------------------------------------------------------------------------------
Version 8.23.0 [v8-stable] 2016-11-15
- NEW BUILD REQUIREMENT: libfastjson 0.99.3
This was introduced in 8.20.0 as a suggestion and has now become a hard

13
Makefile.am

@ -95,6 +95,10 @@ if ENABLE_PMCISCOIOS
SUBDIRS += plugins/pmciscoios
endif
if ENABLE_PMNULL
SUBDIRS += plugins/pmnull
endif
if ENABLE_PMAIXFORWARDEDFROM
SUBDIRS += contrib/pmaixforwardedfrom
endif
@ -219,6 +223,10 @@ if ENABLE_MMANON
SUBDIRS += plugins/mmanon
endif
if ENABLE_MMRM1STSPACE
SUBDIRS += plugins/mmrm1stspace
endif
if ENABLE_MMUTF8FIX
SUBDIRS += plugins/mmutf8fix
endif
@ -231,6 +239,11 @@ if ENABLE_MMSEQUENCE
SUBDIRS += contrib/mmsequence
endif
if ENABLE_MMDBLOOKUP
SUBDIRS += contrib/mmdblookup
endif
if ENABLE_MMFIELDS
SUBDIRS += plugins/mmfields
endif

103
Makefile.in

@ -105,52 +105,55 @@ sbin_PROGRAMS =
@ENABLE_OMSTDOUT_TRUE@am__append_12 = plugins/omstdout
@ENABLE_PMCISCONAMES_TRUE@am__append_13 = contrib/pmcisconames
@ENABLE_PMCISCOIOS_TRUE@am__append_14 = plugins/pmciscoios
@ENABLE_PMAIXFORWARDEDFROM_TRUE@am__append_15 = contrib/pmaixforwardedfrom
@ENABLE_PMSNARE_TRUE@am__append_16 = contrib/pmsnare
@ENABLE_PMPANNGFW_TRUE@am__append_17 = contrib/pmpanngfw
@ENABLE_PMLASTMSG_TRUE@am__append_18 = plugins/pmlastmsg
@ENABLE_OMRULESET_TRUE@am__append_19 = plugins/omruleset
@ENABLE_OMUDPSPOOF_TRUE@am__append_20 = plugins/omudpspoof
@ENABLE_OMMONGODB_TRUE@am__append_21 = plugins/ommongodb
@ENABLE_OMHIREDIS_TRUE@am__append_22 = contrib/omhiredis
@ENABLE_OMZMQ3_TRUE@am__append_23 = contrib/omzmq3
@ENABLE_OMCZMQ_TRUE@am__append_24 = contrib/omczmq
@ENABLE_OMRABBITMQ_TRUE@am__append_25 = contrib/omrabbitmq
@ENABLE_IMZMQ3_TRUE@am__append_26 = contrib/imzmq3
@ENABLE_IMCZMQ_TRUE@am__append_27 = contrib/imczmq
@ENABLE_OMUXSOCK_TRUE@am__append_28 = plugins/omuxsock
@ENABLE_OMHDFS_TRUE@am__append_29 = plugins/omhdfs
@ENABLE_OMJOURNAL_TRUE@am__append_30 = plugins/omjournal
@ENABLE_IMJOURNAL_TRUE@am__append_31 = plugins/imjournal
@ENABLE_ELASTICSEARCH_TRUE@am__append_32 = plugins/omelasticsearch
@ENABLE_MMSNMPTRAPD_TRUE@am__append_33 = plugins/mmsnmptrapd
@ENABLE_IMFILE_TRUE@am__append_34 = plugins/imfile
@ENABLE_IMPTCP_TRUE@am__append_35 = plugins/imptcp
@ENABLE_IMDIAG_TRUE@am__append_36 = plugins/imdiag
@ENABLE_MAIL_TRUE@am__append_37 = plugins/ommail
@ENABLE_OMKAFKA_TRUE@am__append_38 = plugins/omkafka
@ENABLE_OMPROG_TRUE@am__append_39 = plugins/omprog
@ENABLE_RFC3195_TRUE@am__append_40 = plugins/im3195
@ENABLE_MMNORMALIZE_TRUE@am__append_41 = plugins/mmnormalize
@ENABLE_MMJSONPARSE_TRUE@am__append_42 = plugins/mmjsonparse
@ENABLE_MMGROK_TRUE@am__append_43 = contrib/mmgrok
@ENABLE_MMAUDIT_TRUE@am__append_44 = plugins/mmaudit
@ENABLE_MMANON_TRUE@am__append_45 = plugins/mmanon
@ENABLE_MMUTF8FIX_TRUE@am__append_46 = plugins/mmutf8fix
@ENABLE_MMCOUNT_TRUE@am__append_47 = contrib/mmcount
@ENABLE_MMSEQUENCE_TRUE@am__append_48 = contrib/mmsequence
@ENABLE_MMFIELDS_TRUE@am__append_49 = plugins/mmfields
@ENABLE_MMPSTRUCDATA_TRUE@am__append_50 = plugins/mmpstrucdata
@ENABLE_MMRFC5424ADDHMAC_TRUE@am__append_51 = contrib/mmrfc5424addhmac
@ENABLE_PMNULL_TRUE@am__append_15 = plugins/pmnull
@ENABLE_PMAIXFORWARDEDFROM_TRUE@am__append_16 = contrib/pmaixforwardedfrom
@ENABLE_PMSNARE_TRUE@am__append_17 = contrib/pmsnare
@ENABLE_PMPANNGFW_TRUE@am__append_18 = contrib/pmpanngfw
@ENABLE_PMLASTMSG_TRUE@am__append_19 = plugins/pmlastmsg
@ENABLE_OMRULESET_TRUE@am__append_20 = plugins/omruleset
@ENABLE_OMUDPSPOOF_TRUE@am__append_21 = plugins/omudpspoof
@ENABLE_OMMONGODB_TRUE@am__append_22 = plugins/ommongodb
@ENABLE_OMHIREDIS_TRUE@am__append_23 = contrib/omhiredis
@ENABLE_OMZMQ3_TRUE@am__append_24 = contrib/omzmq3
@ENABLE_OMCZMQ_TRUE@am__append_25 = contrib/omczmq
@ENABLE_OMRABBITMQ_TRUE@am__append_26 = contrib/omrabbitmq
@ENABLE_IMZMQ3_TRUE@am__append_27 = contrib/imzmq3
@ENABLE_IMCZMQ_TRUE@am__append_28 = contrib/imczmq
@ENABLE_OMUXSOCK_TRUE@am__append_29 = plugins/omuxsock
@ENABLE_OMHDFS_TRUE@am__append_30 = plugins/omhdfs
@ENABLE_OMJOURNAL_TRUE@am__append_31 = plugins/omjournal
@ENABLE_IMJOURNAL_TRUE@am__append_32 = plugins/imjournal
@ENABLE_ELASTICSEARCH_TRUE@am__append_33 = plugins/omelasticsearch
@ENABLE_MMSNMPTRAPD_TRUE@am__append_34 = plugins/mmsnmptrapd
@ENABLE_IMFILE_TRUE@am__append_35 = plugins/imfile
@ENABLE_IMPTCP_TRUE@am__append_36 = plugins/imptcp
@ENABLE_IMDIAG_TRUE@am__append_37 = plugins/imdiag
@ENABLE_MAIL_TRUE@am__append_38 = plugins/ommail
@ENABLE_OMKAFKA_TRUE@am__append_39 = plugins/omkafka
@ENABLE_OMPROG_TRUE@am__append_40 = plugins/omprog
@ENABLE_RFC3195_TRUE@am__append_41 = plugins/im3195
@ENABLE_MMNORMALIZE_TRUE@am__append_42 = plugins/mmnormalize
@ENABLE_MMJSONPARSE_TRUE@am__append_43 = plugins/mmjsonparse
@ENABLE_MMGROK_TRUE@am__append_44 = contrib/mmgrok
@ENABLE_MMAUDIT_TRUE@am__append_45 = plugins/mmaudit
@ENABLE_MMANON_TRUE@am__append_46 = plugins/mmanon
@ENABLE_MMRM1STSPACE_TRUE@am__append_47 = plugins/mmrm1stspace
@ENABLE_MMUTF8FIX_TRUE@am__append_48 = plugins/mmutf8fix
@ENABLE_MMCOUNT_TRUE@am__append_49 = contrib/mmcount
@ENABLE_MMSEQUENCE_TRUE@am__append_50 = contrib/mmsequence
@ENABLE_MMDBLOOKUP_TRUE@am__append_51 = contrib/mmdblookup
@ENABLE_MMFIELDS_TRUE@am__append_52 = plugins/mmfields
@ENABLE_MMPSTRUCDATA_TRUE@am__append_53 = plugins/mmpstrucdata
@ENABLE_MMRFC5424ADDHMAC_TRUE@am__append_54 = contrib/mmrfc5424addhmac
# omhttpfs
@ENABLE_OMHTTPFS_TRUE@am__append_52 = contrib/omhttpfs
@ENABLE_OMHTTPFS_TRUE@am__append_55 = contrib/omhttpfs
# omamqp1
@ENABLE_OMAMQP1_TRUE@am__append_53 = contrib/omamqp1
@ENABLE_OMAMQP1_TRUE@am__append_56 = contrib/omamqp1
# omtcl
@ENABLE_OMTCL_TRUE@am__append_54 = contrib/omtcl
@ENABLE_OMTCL_TRUE@am__append_57 = contrib/omtcl
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_define.m4 \
@ -264,19 +267,20 @@ DIST_SUBDIRS = compat runtime grammar . plugins/immark \
plugins/imgssapi plugins/omrelp plugins/imrelp plugins/ommysql \
plugins/omlibdbi plugins/ompgsql plugins/omsnmp \
plugins/omstdout contrib/pmcisconames plugins/pmciscoios \
contrib/pmaixforwardedfrom contrib/pmsnare contrib/pmpanngfw \
plugins/pmlastmsg plugins/omruleset plugins/omudpspoof \
plugins/ommongodb contrib/omhiredis contrib/omzmq3 \
contrib/omczmq contrib/omrabbitmq contrib/imzmq3 \
contrib/imczmq plugins/omuxsock plugins/omhdfs \
plugins/pmnull contrib/pmaixforwardedfrom contrib/pmsnare \
contrib/pmpanngfw plugins/pmlastmsg plugins/omruleset \
plugins/omudpspoof plugins/ommongodb contrib/omhiredis \
contrib/omzmq3 contrib/omczmq contrib/omrabbitmq \
contrib/imzmq3 contrib/imczmq plugins/omuxsock plugins/omhdfs \
plugins/omjournal plugins/imjournal plugins/omelasticsearch \
plugins/mmsnmptrapd plugins/imfile plugins/imptcp \
plugins/imdiag plugins/ommail plugins/omkafka plugins/omprog \
plugins/im3195 plugins/mmnormalize plugins/mmjsonparse \
contrib/mmgrok plugins/mmaudit plugins/mmanon \
plugins/mmutf8fix contrib/mmcount contrib/mmsequence \
plugins/mmfields plugins/mmpstrucdata contrib/mmrfc5424addhmac \
contrib/omhttpfs contrib/omamqp1 contrib/omtcl tests
plugins/mmrm1stspace plugins/mmutf8fix contrib/mmcount \
contrib/mmsequence contrib/mmdblookup plugins/mmfields \
plugins/mmpstrucdata contrib/mmrfc5424addhmac contrib/omhttpfs \
contrib/omamqp1 contrib/omtcl tests
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
COPYING COPYING.LESSER ChangeLog INSTALL NEWS README compile \
config.guess config.sub depcomp install-sh ltmain.sh missing \
@ -582,7 +586,8 @@ SUBDIRS = compat runtime grammar . plugins/immark plugins/imuxsock \
$(am__append_45) $(am__append_46) $(am__append_47) \
$(am__append_48) $(am__append_49) $(am__append_50) \
$(am__append_51) $(am__append_52) $(am__append_53) \
$(am__append_54) tests
$(am__append_54) $(am__append_55) $(am__append_56) \
$(am__append_57) tests
# make sure "make distcheck" tries to build all modules. This means that
# a developer must always have an environment where every supporting library

36
action.c

@ -92,6 +92,9 @@
#include <strings.h>
#include <time.h>
#include <errno.h>
#ifdef _AIX
#include <pthread.h>
#endif
#include <json.h>
#include "dirty.h"
@ -111,15 +114,21 @@
#include "parserif.h"
#include "statsobj.h"
/* AIXPORT : cs renamed to legacy_cs as clashes with libpthreads variable in complete file*/
#ifdef _AIX
#define cs legacy_cs
#endif
#if !defined(_AIX)
#pragma GCC diagnostic ignored "-Wswitch-enum"
#endif
#define NO_TIME_PROVIDED 0 /* indicate we do not provide any cached time */
/* forward definitions */
static rsRetVal processBatchMain(void *pVoid, batch_t *pBatch, wti_t * const pWti);
static rsRetVal doSubmitToActionQ(action_t * const pAction, wti_t * const pWti, msg_t*);
static rsRetVal doSubmitToActionQComplex(action_t * const pAction, wti_t * const pWti, msg_t*);
static rsRetVal doSubmitToActionQNotAllMark(action_t * const pAction, wti_t * const pWti, msg_t*);
static rsRetVal doSubmitToActionQ(action_t * const pAction, wti_t * const pWti, smsg_t*);
static rsRetVal doSubmitToActionQComplex(action_t * const pAction, wti_t * const pWti, smsg_t*);
static rsRetVal doSubmitToActionQNotAllMark(action_t * const pAction, wti_t * const pWti, smsg_t*);
/* object static data (once for all instances) */
DEFobjCurrIf(obj)
@ -165,6 +174,7 @@ typedef struct configSettings_s {
int iActionQueueDeqtWinToHr; /* hour begin of time frame when queue is to be dequeued */
} configSettings_t;
configSettings_t cs; /* our current config settings */
configSettings_t cs_save; /* our saved (scope!) config settings */
@ -947,7 +957,7 @@ static rsRetVal actionDbgPrint(action_t *pThis)
static rsRetVal
prepareDoActionParams(action_t * __restrict__ const pAction,
wti_t * __restrict__ const pWti,
msg_t *__restrict__ const pMsg,
smsg_t *__restrict__ const pMsg,
struct syslogTime *ttNow)
{
int i;
@ -996,8 +1006,10 @@ finalize_it:
/* the #pragmas can go away when we have disable array-passing mode */
#if !defined(_AIX)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
#endif
void
releaseDoActionParams(action_t *__restrict__ const pAction, wti_t *__restrict__ const pWti, int action_destruct)
{
@ -1049,7 +1061,9 @@ releaseDoActionParams(action_t *__restrict__ const pAction, wti_t *__restrict__
return;
}
#if !defined(_AIX)
#pragma GCC diagnostic pop
#endif
/* This is used in resume processing. We only finally know that a resume
@ -1362,7 +1376,7 @@ actionCommitAllDirect(wti_t *__restrict__ const pWti)
static rsRetVal
processMsgMain(action_t *__restrict__ const pAction,
wti_t *__restrict__ const pWti,
msg_t *__restrict__ const pMsg,
smsg_t *__restrict__ const pMsg,
struct syslogTime *ttNow)
{
DEFiRet;
@ -1517,7 +1531,7 @@ static rsRetVal setActionQueType(void __attribute__((unused)) *pVal, uchar *pszT
* rgerhards, 2010-06-08
*/
static rsRetVal
doSubmitToActionQ(action_t * const pAction, wti_t * const pWti, msg_t *pMsg)
doSubmitToActionQ(action_t * const pAction, wti_t * const pWti, smsg_t *pMsg)
{
struct syslogTime ttNow; // TODO: think if we can buffer this in pWti
DEFiRet;
@ -1566,7 +1580,7 @@ finalize_it:
* be filtered out before calling us (what is done currently!).
*/
rsRetVal
actionWriteToAction(action_t * const pAction, msg_t *pMsg, wti_t * const pWti)
actionWriteToAction(action_t * const pAction, smsg_t *pMsg, wti_t * const pWti)
{
DEFiRet;
@ -1631,9 +1645,11 @@ finalize_it:
/* Call configured action, most complex case with all features supported (and thus slow).
* rgerhards, 2010-06-08
*/
#ifndef _AIX
#pragma GCC diagnostic ignored "-Wempty-body"
#endif
static rsRetVal
doSubmitToActionQComplex(action_t * const pAction, wti_t * const pWti, msg_t *pMsg)
doSubmitToActionQComplex(action_t * const pAction, wti_t * const pWti, smsg_t *pMsg)
{
DEFiRet;
@ -1660,7 +1676,9 @@ finalize_it:
RETiRet;
}
#ifndef _AIX
#pragma GCC diagnostic warning "-Wempty-body"
#endif
/* helper to activateActions, it activates a specific action.
@ -1709,7 +1727,7 @@ activateActions(void)
* rgerhards, 2010-06-08
*/
static rsRetVal
doSubmitToActionQNotAllMark(action_t * const pAction, wti_t * const pWti, msg_t * const pMsg)
doSubmitToActionQNotAllMark(action_t * const pAction, wti_t * const pWti, smsg_t * const pMsg)
{
int doProcess = 1;
time_t lastAct;

4
action.h

@ -61,7 +61,7 @@ struct action_s {
struct modInfo_s *pMod;/* pointer to output module handling this selector */
void *pModData; /* pointer to module data - content is module-specific */
sbool bRepMsgHasMsg; /* "message repeated..." has msg fragment in it (0-no, 1-yes) */
rsRetVal (*submitToActQ)(action_t *, wti_t*, msg_t*);/* function submit message to action queue */
rsRetVal (*submitToActQ)(action_t *, wti_t*, smsg_t*);/* function submit message to action queue */
rsRetVal (*qConstruct)(struct queue_s *pThis);
sbool bUsesMsgPassingMode;
sbool bNeedReleaseBatch; /* do we need to release batch ressources? Depends on ParamPassig modes... */
@ -96,7 +96,7 @@ rsRetVal actionDestruct(action_t *pThis);
//rsRetVal actionDbgPrint(action_t *pThis);
rsRetVal actionSetGlobalResumeInterval(int iNewVal);
rsRetVal actionDoAction(action_t *pAction);
rsRetVal actionWriteToAction(action_t *pAction, msg_t *pMsg, wti_t*);
rsRetVal actionWriteToAction(action_t *pAction, smsg_t *pMsg, wti_t*);
rsRetVal actionCallHUPHdlr(action_t *pAction);
rsRetVal actionClassInit(void);
rsRetVal addAction(action_t **ppAction, modInfo_t *pMod, void *pModData, omodStringRequest_t *pOMSR, struct cnfparamvals *actParams, struct nvlst *lst);

264
compat/getifaddrs.c

@ -26,15 +26,30 @@
*/
#include <netdb.h>
#if !defined (_AIX)
#include <nss_dbdefs.h>
#endif
#include <netinet/in.h>
#include <sys/socket.h>
#if defined (_AIX)
#include <sys/errno.h>
#include <sys/ioctl.h>
#endif
#include <string.h>
#include <stdio.h>
#if defined (_AIX)
#include <netdb.h>
#endif
#if !defined (_AIX)
#include <sys/sockio.h>
#endif
#include <sys/types.h>
#include <stdlib.h>
#include <net/if.h>
#if defined (_AIX)
#include <netinet/in6_var.h>
#endif
#include <ifaddrs.h>
/* Normally this is defined in <net/if.h> but was new for Solaris 11 */
@ -42,12 +57,18 @@
#define LIFC_ENABLED 0x20
#endif
#if defined (_AIX) /* Use ifaddrs_rsys instead of ifaddrs and ifreq instead of lifreq */
int getallifaddrs(sa_family_t af, struct ifaddrs_rsys **ifap, int64_t flags);
int getallifs(int s, sa_family_t af, struct ifreq **ifr, int *numifs,
int64_t ifc_flags);
#else
int getallifaddrs(sa_family_t af, struct ifaddrs **ifap, int64_t flags);
int getallifs(int s, sa_family_t af, struct lifreq **lifr, int *numifs,
int64_t lifc_flags);
#endif
/*
* Create a linked list of `struct ifaddrs' structures, one for each
* Create a linked list of `struct ifaddrs_rsys' structures, one for each
* address that is UP. If successful, store the list in *ifap and
* return 0. On errors, return -1 and set `errno'.
*
@ -55,11 +76,19 @@ int getallifs(int s, sa_family_t af, struct lifreq **lifr, int *numifs,
* only be properly freed by passing it to `freeifaddrs'.
*/
int
#if defined (_AIX)
getifaddrs(struct ifaddrs_rsys **ifap)
#else
getifaddrs(struct ifaddrs **ifap)
#endif
{
int err;
char *cp;
struct ifaddrs *curr;
#if defined (_AIX)
struct ifaddrs_rsys *curr;
#else
struct ifaddrs *curr;
#endif
if (ifap == NULL) {
errno = EINVAL;
@ -77,9 +106,17 @@ getifaddrs(struct ifaddrs **ifap)
}
void
#if defined (_AIX)
freeifaddrs(struct ifaddrs_rsys *ifa)
#else
freeifaddrs(struct ifaddrs *ifa)
#endif
{
#if defined (_AIX)
struct ifaddrs_rsys *curr;
#else
struct ifaddrs *curr;
#endif
while (ifa != NULL) {
curr = ifa;
@ -98,6 +135,228 @@ freeifaddrs(struct ifaddrs *ifa)
* Address list that is returned by this function must be freed
* using freeifaddrs().
*/
#if defined (_AIX)
int
getallifaddrs(sa_family_t af, struct ifaddrs_rsys **ifap, int64_t flags)
{
struct ifreq *buf = NULL;
struct ifreq *ifrp;
struct ifreq ifrl;
struct in6_ifreq ifrl6;
int ret;
int s, n, iflen;
struct ifaddrs_rsys *curr, *prev;
sa_family_t ifr_af;
int sock4;
int sock6;
int err;
int ifsize;
char *s_ifrp, *e_ifrp;
int flag;
if ((sock4 = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return (-1);
if ((sock6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
err = errno;
close(sock4);
errno = err;
return (-1);
}
retry:
/* Get all interfaces from SIOCGIFCONF */
ret = getallifs(sock4, af, &buf, &iflen, (flags & ~LIFC_ENABLED));
if (ret != 0)
goto fail;
/*
* Loop through the interfaces obtained from SIOCGIFCOMF
* and retrieve the addresses, netmask and flags.
*/
prev = NULL;
s_ifrp = (char *)buf;
e_ifrp = (char *)buf + iflen;
*ifap = NULL;
while (s_ifrp < e_ifrp)
{
ifrp = (struct ifreq *)s_ifrp;
ifsize = sizeof(struct ifreq);
if (ifrp->ifr_addr.sa_len > sizeof(ifrp->ifr_ifru)) {
ifsize += ifrp->ifr_addr.sa_len - sizeof(ifrp->ifr_ifru);
}
/* Prepare for the ioctl call */
(void) strncpy(ifrl.ifr_name, ifrp->ifr_name,
sizeof (ifrl.ifr_name));
(void) strncpy(ifrl6.ifr_name, ifrp->ifr_name,
sizeof (ifrl.ifr_name));
ifr_af = ifrp->ifr_addr.sa_family;
if (ifr_af != AF_INET && ifr_af != AF_INET6)
goto next;
s = (ifr_af == AF_INET ? sock4 : sock6);
if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifrl) < 0)
goto fail;
if ((flags & LIFC_ENABLED) && !(ifrl.ifr_flags & IFF_UP)) {
goto next;
}
/*
* Allocate the current list node. Each node contains data
* for one ifaddrs structure.
*/
curr = calloc(1, sizeof (struct ifaddrs_rsys));
if (curr == NULL)
goto fail;
if (prev != NULL) {
prev->ifa_next = curr;
} else {
/* First node in the linked list */
*ifap = curr;
}
prev = curr;
/* AIXPORT : ifreq field names used instead of linux lifreq field names */
curr->ifa_flags = ifrl.ifr_flags;
if ((curr->ifa_name = strdup(ifrp->ifr_name)) == NULL)
goto fail;
curr->ifa_addr = malloc(sizeof (struct sockaddr_storage));
if (curr->ifa_addr == NULL)
goto fail;
(void) memcpy(curr->ifa_addr, &ifrp->ifr_addr,
sizeof (struct sockaddr_storage));
/* Get the netmask */
if (ifr_af == AF_INET) {
if (ioctl(s, SIOCGIFNETMASK, (caddr_t)&ifrl) < 0) {
goto fail;
}
curr->ifa_netmask = malloc(sizeof (struct sockaddr_storage));
if (curr->ifa_netmask == NULL)
goto fail;
(void) memcpy(curr->ifa_netmask, &ifrl.ifr_addr,
sizeof (struct sockaddr_storage));
} else {
if (ioctl(s, SIOCGIFNETMASK6, (caddr_t)&ifrl6) < 0) {
goto fail;
}
curr->ifa_netmask = malloc(sizeof (struct sockaddr_storage));
if (curr->ifa_netmask == NULL)
goto fail;
(void) memcpy(curr->ifa_netmask, &ifrl6.ifr_Addr,
sizeof (struct sockaddr_storage));
}
/* Get the destination for a pt-pt interface */
if (curr->ifa_flags & IFF_POINTOPOINT) {
if (ifr_af == AF_INET) {
if (ioctl(s, SIOCGIFDSTADDR, (caddr_t)&ifrl) < 0)
goto fail;
curr->ifa_dstaddr = malloc(
sizeof (struct sockaddr_storage));
if (curr->ifa_dstaddr == NULL)
goto fail;
(void) memcpy(curr->ifa_dstaddr, &ifrl.ifr_addr,
sizeof (struct sockaddr_storage));
} else {
if (ioctl(s, SIOCGIFDSTADDR6, (caddr_t)&ifrl6) < 0)
goto fail;
curr->ifa_dstaddr = malloc(
sizeof (struct sockaddr_storage));
if (curr->ifa_dstaddr == NULL)
goto fail;
(void) memcpy(curr->ifa_dstaddr, &ifrl6.ifr_Addr,
sizeof (struct sockaddr_storage));
}
/* Do not get broadcast address for IPv6 */
} else if ((curr->ifa_flags & IFF_BROADCAST) && (ifr_af == AF_INET)) {
if (ioctl(s, SIOCGIFBRDADDR, (caddr_t)&ifrl) < 0)
goto fail;
curr->ifa_broadaddr = malloc(
sizeof (struct sockaddr_storage));
if (curr->ifa_broadaddr == NULL)
goto fail;
(void) memcpy(curr->ifa_broadaddr, &ifrl.ifr_addr,
sizeof (struct sockaddr_storage));
}
next:
s_ifrp += ifsize;
}
free(buf);
close(sock4);
close(sock6);
return (0);
fail:
err = errno;
free(buf);
freeifaddrs(*ifap);
*ifap = NULL;
if (err == ENXIO)
goto retry;
close(sock4);
close(sock6);
errno = err;
return (-1);
}
/*
* Do a SIOCGIFCONF and store all the interfaces in `buf'.
*/
int
getallifs(int s, sa_family_t af, struct ifreq **ifr, int *iflen,
int64_t ifc_flags)
{
int ifsize;
struct ifconf ifc;
size_t bufsize;
char *tmp;
caddr_t *buf = (caddr_t *)ifr;
*buf = NULL;
retry:
if (ioctl(s, SIOCGSIZIFCONF, &ifsize) < 0)
goto fail;
/*
* When calculating the buffer size needed, add a small number
* of interfaces to those we counted. We do this to capture
* the interface status of potential interfaces which may have
* been plumbed between the SIOCGSIZIFCONF and the SIOCGIFCONF.
*/
bufsize = ifsize + (4 * sizeof (struct in6_ifreq));
if ((tmp = realloc(*buf, bufsize)) == NULL)
goto fail;
*buf = tmp;
ifc.ifc_buf = *buf;
ifc.ifc_len = bufsize;
if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0)
goto fail;
*iflen = ifc.ifc_len;
if (*iflen >= bufsize) {
/*
* If every entry was filled, there are probably
* more interfaces than (ifn + 4)
* Redo the ioctls SIOCGSIZIFCONF and SIOCGIFCONF to
* get all the interfaces.
*/
goto retry;
}
return (0);
fail:
free(*buf);
*buf = NULL;
return (-1);
}
#else /* _AIX */
int
getallifaddrs(sa_family_t af, struct ifaddrs **ifap, int64_t flags)
{
@ -280,4 +539,5 @@ fail:
*buf = NULL;
return (-1);
}
#endif /* _AIX */
#endif /* HAVE_GETIFADDRS */

10
compat/ifaddrs.h

@ -36,9 +36,9 @@ extern "C" {
* The `getifaddrs' function generates a linked list of these structures.
* Each element of the list describes one network interface.
*/
#if defined(_INT64_TYPE)
struct ifaddrs {
struct ifaddrs *ifa_next; /* Pointer to the next structure. */
#if (defined(_INT64_TYPE)|| defined(_AIX))
struct ifaddrs_rsys {
struct ifaddrs_rsys *ifa_next; /* Pointer to the next structure. */
char *ifa_name; /* Name of this network interface. */
uint64_t ifa_flags; /* Flags as from SIOCGLIFFLAGS ioctl. */
struct sockaddr *ifa_addr; /* Network address of this interface. */
@ -75,10 +75,10 @@ struct ifaddrs {
* The storage returned in *ifap is allocated dynamically and can
* only be properly freed by passing it to `freeifaddrs'.
*/
extern int getifaddrs(struct ifaddrs **);
extern int getifaddrs(struct ifaddrs_rsys **);
/* Reclaim the storage allocated by a previous `getifaddrs' call. */
extern void freeifaddrs(struct ifaddrs *);
extern void freeifaddrs(struct ifaddrs_rsys *);
#ifdef __cplusplus

6
config.h.in

@ -156,6 +156,9 @@
/* Define to 1 if you have the `malloc_trim' function. */
#undef HAVE_MALLOC_TRIM
/* Define to 1 if you have the <maxminddb.h> header file. */
#undef HAVE_MAXMINDDB_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@ -384,6 +387,9 @@
/* Defined if debug mode is disabled. */
#undef NDEBUG
/* Indicator for a AIX OS */
#undef OS_AIX
/* Indicator for a BSD OS */
#undef OS_BSD

218
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.23.0.
# Generated by GNU Autoconf 2.69 for rsyslog 8.24.0.
#
# Report bugs to <rsyslog@lists.adiscon.com>.
#
@ -590,11 +590,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='rsyslog'
PACKAGE_TARNAME='rsyslog'
PACKAGE_VERSION='8.23.0'
PACKAGE_STRING='rsyslog 8.23.0'
PACKAGE_VERSION='8.24.0'
PACKAGE_STRING='rsyslog 8.24.0'
PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com'
PACKAGE_URL=''
ac_default_prefix=/usr
ac_unique_file="ChangeLog"
# Factoring default headers for most tests.
ac_includes_default="\
@ -697,6 +698,8 @@ ENABLE_PMSNARE_FALSE
ENABLE_PMSNARE_TRUE
ENABLE_PMAIXFORWARDEDFROM_FALSE
ENABLE_PMAIXFORWARDEDFROM_TRUE
ENABLE_PMNULL_FALSE
ENABLE_PMNULL_TRUE
ENABLE_PMCISCOIOS_FALSE
ENABLE_PMCISCOIOS_TRUE
ENABLE_PMCISCONAMES_FALSE
@ -754,12 +757,16 @@ ENABLE_MMPSTRUCDATA_FALSE
ENABLE_MMPSTRUCDATA_TRUE
ENABLE_MMFIELDS_FALSE
ENABLE_MMFIELDS_TRUE
ENABLE_MMDBLOOKUP_FALSE
ENABLE_MMDBLOOKUP_TRUE
ENABLE_MMSEQUENCE_FALSE
ENABLE_MMSEQUENCE_TRUE
ENABLE_MMCOUNT_FALSE
ENABLE_MMCOUNT_TRUE
ENABLE_MMUTF8FIX_FALSE
ENABLE_MMUTF8FIX_TRUE
ENABLE_MMRM1STSPACE_FALSE
ENABLE_MMRM1STSPACE_TRUE
ENABLE_MMANON_FALSE
ENABLE_MMANON_TRUE
ENABLE_MMAUDIT_FALSE
@ -966,6 +973,8 @@ am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
AIX_FALSE
AIX_TRUE
target_alias
host_alias
build_alias
@ -1060,9 +1069,11 @@ enable_mmjsonparse
enable_mmgrok
enable_mmaudit
enable_mmanon
enable_mmrm1stspace
enable_mmutf8fix
enable_mmcount
enable_mmsequence
enable_mmdblookup
enable_mmfields
enable_mmpstrucdata
enable_mmrfc5424addhmac
@ -1085,6 +1096,7 @@ enable_omjournal
enable_pmlastmsg
enable_pmcisconames
enable_pmciscoios
enable_pmnull
enable_pmaixforwardedfrom
enable_pmsnare
enable_pmpanngfw
@ -1712,7 +1724,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.23.0 to adapt to many kinds of systems.
\`configure' configures rsyslog 8.24.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1783,7 +1795,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of rsyslog 8.23.0:";;
short | recursive ) echo "Configuration of rsyslog 8.24.0:";;
esac
cat <<\_ACEOF
@ -1855,9 +1867,11 @@ Optional Features:
--enable-mmgrok Enable building mmgrok support [default=no]
--enable-mmaudit Enable building mmaudit support [default=no]
--enable-mmanon Enable building mmanon support [default=no]
--enable-mmrm1stspace Enable building mmrm1stspace support [default=no]
--enable-mmutf8fix Enable building mmutf8fix support [default=no]
--enable-mmcount Enable message counting [default=no]
--enable-mmsequence Enable sequence generator [default=no]
--enable-mmdblookup Enable mmdb lookup helper [default=no]
--enable-mmfields Enable building mmfields support [default=no]
--enable-mmpstrucdata Enable building mmpstrucdata support [default=no]
--enable-mmrfc5424addhmac
@ -1885,6 +1899,7 @@ Optional Features:
--enable-pmlastmsg Compiles lastmsg parser module [default=no]
--enable-pmcisconames Compiles cisconames parser module [default=no]
--enable-pmciscoios Compiles ciscoios parser module [default=no]
--enable-pmnull Compiles null parser module [default=no]
--enable-pmaixforwardedfrom
Compiles aixforwardedfrom parser module [default=no]
--enable-pmsnare Compiles snare parser module [default=no]
@ -2089,7 +2104,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
rsyslog configure 8.23.0
rsyslog configure 8.24.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2669,7 +2684,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.23.0, which was
It was created by rsyslog $as_me 8.24.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -3017,6 +3032,41 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
# AIXPORT START: Detect the underlying OS
unamestr=$(uname)
if test x$unamestr = xAIX; then
AIX_TRUE=
AIX_FALSE='#'
else
AIX_TRUE='#'
AIX_FALSE=
fi
# AIXPORT END
# AIXPORT START : Set the required variables for AIX config script
if test "$unamestr" = "AIX"; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/pkgconfig"
LIBS="-lbsd -lsrc"
CPPFLAGS="-D_THREAD_SAFE -D_BSD43 -D_AIX"
CFLAGS="-D_AIX"
LDFLAGS="-qcpluscmt -brtl -bexpall -bE:strippedsymbols.exp "
LIBESTR_LIBS="-L/usr/lib/ -lestr"
LIBESTR_CFLAGS="-I/usr/include"
LIBLOGGING_STDLOG_LIBS="-L/usr/lib/ -llogging-stdlog"
LIBLOGGING_STDLOG_CFLAGS="-I/usr/include"
GNUTLS_LIBS="-L/usr/lib/ -lgnutls"
GNUTLS_CFLAGS="-I/usr/include"
RELP_LIBS="-L/usr/lib/ -lrelp"
RELP_CFLAGS="-I/usr/include"
CC="xlc_r"
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
fi
# AIXPORT END
am__api_version='1.15'
ac_aux_dir=
@ -3532,7 +3582,7 @@ fi
# Define the identity of the package.
PACKAGE='rsyslog'
VERSION='8.23.0'
VERSION='8.24.0'
cat >>confdefs.h <<_ACEOF
@ -6307,6 +6357,14 @@ fi
# AIXPORT START: enable dlopen
if test "$unamestr" = "AIX"; then
enable_dlopen=yes
fi
# AIXPORT end
case `pwd` in
*\ * | *\ *)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@ -9686,8 +9744,6 @@ done
enable_dlopen=no
enable_win32_dll=no
@ -15247,6 +15303,14 @@ $as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
LIBUUID_LIBS=${LIBUUID_LIBS:=-luuid}
;;
# AIXPORT START
*-*-aix*)
os_type="aix"
$as_echo "#define OS_AIX 1" >>confdefs.h
;;
# AIXPORT END
esac
# Running from git source?
@ -17535,10 +17599,14 @@ if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
$as_echo "#define USE_PTHREADS 1" >>confdefs.h
PTHREADS_LIBS="-lpthread"
case "${os_type}" in
solaris) PTHREADS_CFLAGS="-pthreads" ;;
*) PTHREADS_CFLAGS="-pthread" ;;
esac
if test "$unamestr" = "AIX"; then
PTHREADS_CFLAGS="-lpthreads"
else
case "${os_type}" in
solaris) PTHREADS_CFLAGS="-pthreads" ;;
*) PTHREADS_CFLAGS="-pthread" ;;
esac
fi
@ -20146,6 +20214,29 @@ fi
# mmrm1stspace
# Check whether --enable-mmrm1stspace was given.
if test "${enable_mmrm1stspace+set}" = set; then :
enableval=$enable_mmrm1stspace; case "${enableval}" in
yes) enable_mmrm1stspace="yes" ;;
no) enable_mmrm1stspace="no" ;;
*) as_fn_error $? "bad value ${enableval} for --enable-mmrm1stspace" "$LINENO" 5 ;;
esac
else
enable_mmrm1stspace=no
fi
if test x$enable_mmrm1stspace = xyes; then
ENABLE_MMRM1STSPACE_TRUE=
ENABLE_MMRM1STSPACE_FALSE='#'
else
ENABLE_MMRM1STSPACE_TRUE='#'
ENABLE_MMRM1STSPACE_FALSE=
fi
# mmutf8fix
# Check whether --enable-mmutf8fix was given.
if test "${enable_mmutf8fix+set}" = set; then :
@ -20215,6 +20306,46 @@ fi
# mmdblookup
# Check whether --enable-mmdblookup was given.
if test "${enable_mmdblookup+set}" = set; then :
enableval=$enable_mmdblookup; case "${enableval}" in
yes) enable_mmdblookup="yes" ;;
no) enable_mmdblookup="no" ;;
*) as_fn_error $? "bad value ${enableval} for --enable-mmdblookup" "$LINENO" 5 ;;
esac
else
enable_mmdblookup=no
fi
if test "x$enable_mmdblookup"; then
#PKG_CHECK_MODULES(LIBMAXMINDDB, libmaxminddb)
for ac_header in maxminddb.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "maxminddb.h" "ac_cv_header_maxminddb_h" "$ac_includes_default"
if test "x$ac_cv_header_maxminddb_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MAXMINDDB_H 1
_ACEOF
fi
done
fi
if test x$enable_mmdblookup = xyes; then
ENABLE_MMDBLOOKUP_TRUE=
ENABLE_MMDBLOOKUP_FALSE='#'
else
ENABLE_MMDBLOOKUP_TRUE='#'
ENABLE_MMDBLOOKUP_FALSE=
fi
# mmfields
# Check whether --enable-mmfields was given.
if test "${enable_mmfields+set}" = set; then :
@ -21753,6 +21884,29 @@ fi
# settings for pmnull
# Check whether --enable-pmnull was given.
if test "${enable_pmnull+set}" = set; then :
enableval=$enable_pmnull; case "${enableval}" in
yes) enable_pmnull="yes" ;;
no) enable_pmnull="no" ;;
*) as_fn_error $? "bad value ${enableval} for --enable-pmnull" "$LINENO" 5 ;;
esac
else
enable_pmnull=no
fi
if test x$enable_pmnull = xyes; then
ENABLE_PMNULL_TRUE=
ENABLE_PMNULL_FALSE='#'
else
ENABLE_PMNULL_TRUE='#'
ENABLE_PMNULL_FALSE=
fi
# settings for pmaixforwardedfrom
# Check whether --enable-pmaixforwardedfrom was given.
if test "${enable_pmaixforwardedfrom+set}" = set; then :
@ -22064,7 +22218,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 22067 "configure" */
/* #line 22221 "configure" */
public class Test {
}
EOF
@ -22239,7 +22393,7 @@ EOF
if $UUDECODE Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
echo "configure: 22242: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: 22396: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
@ -22356,7 +22510,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 22359 "configure" */
/* #line 22513 "configure" */
public class Test {
}
EOF
@ -22391,7 +22545,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
/* [#]line 22394 "configure" */
/* [#]line 22548 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
@ -24270,7 +24424,7 @@ if test "x$have_to_generate_man_pages" = "xyes" && test "x$RST2MAN" = "xfalse";
fi
ac_config_files="$ac_config_files Makefile runtime/Makefile compat/Makefile grammar/Makefile tools/Makefile plugins/imudp/Makefile plugins/imtcp/Makefile plugins/im3195/Makefile plugins/imgssapi/Makefile plugins/imuxsock/Makefile plugins/imjournal/Makefile plugins/immark/Makefile plugins/imklog/Makefile plugins/omhdfs/Makefile plugins/omkafka/Makefile plugins/omprog/Makefile plugins/mmexternal/Makefile plugins/omstdout/Makefile plugins/omjournal/Makefile plugins/pmciscoios/Makefile plugins/omruleset/Makefile plugins/omuxsock/Makefile plugins/imfile/Makefile plugins/imsolaris/Makefile plugins/imptcp/Makefile plugins/impstats/Makefile plugins/imrelp/Makefile plugins/imdiag/Makefile plugins/omtesting/Makefile plugins/omgssapi/Makefile plugins/ommysql/Makefile plugins/ompgsql/Makefile plugins/omrelp/Makefile plugins/omlibdbi/Makefile plugins/ommail/Makefile plugins/omsnmp/Makefile plugins/omudpspoof/Makefile plugins/ommongodb/Makefile plugins/mmnormalize/Makefile plugins/mmjsonparse/Makefile plugins/mmaudit/Makefile plugins/mmanon/Makefile plugins/mmutf8fix/Makefile plugins/mmfields/Makefile plugins/mmpstrucdata/Makefile plugins/omelasticsearch/Makefile plugins/mmsnmptrapd/Makefile plugins/pmlastmsg/Makefile contrib/pmsnare/Makefile contrib/pmpanngfw/Makefile contrib/pmaixforwardedfrom/Makefile contrib/omhiredis/Makefile contrib/omrabbitmq/Makefile contrib/imkmsg/Makefile contrib/mmgrok/Makefile contrib/mmcount/Makefile contrib/omzmq3/Makefile contrib/omczmq/Makefile contrib/imzmq3/Makefile contrib/imczmq/Makefile contrib/mmsequence/Makefile contrib/mmrfc5424addhmac/Makefile contrib/pmcisconames/Makefile contrib/omhttpfs/Makefile contrib/omamqp1/Makefile contrib/omtcl/Makefile tests/Makefile"
ac_config_files="$ac_config_files Makefile runtime/Makefile compat/Makefile grammar/Makefile tools/Makefile plugins/imudp/Makefile plugins/imtcp/Makefile plugins/im3195/Makefile plugins/imgssapi/Makefile plugins/imuxsock/Makefile plugins/imjournal/Makefile plugins/immark/Makefile plugins/imklog/Makefile plugins/omhdfs/Makefile plugins/omkafka/Makefile plugins/omprog/Makefile plugins/mmexternal/Makefile plugins/omstdout/Makefile plugins/omjournal/Makefile plugins/pmciscoios/Makefile plugins/pmnull/Makefile plugins/omruleset/Makefile plugins/omuxsock/Makefile plugins/imfile/Makefile plugins/imsolaris/Makefile plugins/imptcp/Makefile plugins/impstats/Makefile plugins/imrelp/Makefile plugins/imdiag/Makefile plugins/omtesting/Makefile plugins/omgssapi/Makefile plugins/ommysql/Makefile plugins/ompgsql/Makefile plugins/omrelp/Makefile plugins/omlibdbi/Makefile plugins/ommail/Makefile plugins/omsnmp/Makefile plugins/omudpspoof/Makefile plugins/ommongodb/Makefile plugins/mmnormalize/Makefile plugins/mmjsonparse/Makefile plugins/mmaudit/Makefile plugins/mmanon/Makefile plugins/mmrm1stspace/Makefile plugins/mmutf8fix/Makefile plugins/mmfields/Makefile plugins/mmpstrucdata/Makefile plugins/omelasticsearch/Makefile plugins/mmsnmptrapd/Makefile plugins/pmlastmsg/Makefile contrib/pmsnare/Makefile contrib/pmpanngfw/Makefile contrib/pmaixforwardedfrom/Makefile contrib/omhiredis/Makefile contrib/omrabbitmq/Makefile contrib/imkmsg/Makefile contrib/mmgrok/Makefile contrib/mmcount/Makefile contrib/omzmq3/Makefile contrib/omczmq/Makefile contrib/imzmq3/Makefile contrib/imczmq/Makefile contrib/mmsequence/Makefile contrib/mmdblookup/Makefile contrib/mmrfc5424addhmac/Makefile contrib/pmcisconames/Makefile contrib/omhttpfs/Makefile contrib/omamqp1/Makefile contrib/omtcl/Makefile tests/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -24381,6 +24535,10 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
if test -z "${AIX_TRUE}" && test -z "${AIX_FALSE}"; then
as_fn_error $? "conditional \"AIX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
$as_echo_n "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
@ -24557,6 +24715,10 @@ if test -z "${ENABLE_MMANON_TRUE}" && test -z "${ENABLE_MMANON_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_MMANON\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_MMRM1STSPACE_TRUE}" && test -z "${ENABLE_MMRM1STSPACE_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_MMRM1STSPACE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_MMUTF8FIX_TRUE}" && test -z "${ENABLE_MMUTF8FIX_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_MMUTF8FIX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -24569,6 +24731,10 @@ if test -z "${ENABLE_MMSEQUENCE_TRUE}" && test -z "${ENABLE_MMSEQUENCE_FALSE}";
as_fn_error $? "conditional \"ENABLE_MMSEQUENCE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_MMDBLOOKUP_TRUE}" && test -z "${ENABLE_MMDBLOOKUP_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_MMDBLOOKUP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_MMFIELDS_TRUE}" && test -z "${ENABLE_MMFIELDS_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_MMFIELDS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -24653,6 +24819,10 @@ if test -z "${ENABLE_PMCISCOIOS_TRUE}" && test -z "${ENABLE_PMCISCOIOS_FALSE}";
as_fn_error $? "conditional \"ENABLE_PMCISCOIOS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_PMNULL_TRUE}" && test -z "${ENABLE_PMNULL_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_PMNULL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_PMAIXFORWARDEDFROM_TRUE}" && test -z "${ENABLE_PMAIXFORWARDEDFROM_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_PMAIXFORWARDEDFROM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -25134,7 +25304,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.23.0, which was
This file was extended by rsyslog $as_me 8.24.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -25200,7 +25370,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.23.0
rsyslog config.status 8.24.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@ -25635,6 +25805,7 @@ do
"plugins/omstdout/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/omstdout/Makefile" ;;
"plugins/omjournal/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/omjournal/Makefile" ;;
"plugins/pmciscoios/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/pmciscoios/Makefile" ;;
"plugins/pmnull/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/pmnull/Makefile" ;;
"plugins/omruleset/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/omruleset/Makefile" ;;
"plugins/omuxsock/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/omuxsock/Makefile" ;;
"plugins/imfile/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/imfile/Makefile" ;;
@ -25657,6 +25828,7 @@ do
"plugins/mmjsonparse/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmjsonparse/Makefile" ;;
"plugins/mmaudit/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmaudit/Makefile" ;;
"plugins/mmanon/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmanon/Makefile" ;;
"plugins/mmrm1stspace/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmrm1stspace/Makefile" ;;
"plugins/mmutf8fix/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmutf8fix/Makefile" ;;
"plugins/mmfields/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmfields/Makefile" ;;
"plugins/mmpstrucdata/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mmpstrucdata/Makefile" ;;
@ -25676,6 +25848,7 @@ do
"contrib/imzmq3/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/imzmq3/Makefile" ;;
"contrib/imczmq/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/imczmq/Makefile" ;;
"contrib/mmsequence/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/mmsequence/Makefile" ;;
"contrib/mmdblookup/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/mmdblookup/Makefile" ;;
"contrib/mmrfc5424addhmac/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/mmrfc5424addhmac/Makefile" ;;
"contrib/pmcisconames/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/pmcisconames/Makefile" ;;
"contrib/omhttpfs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/omhttpfs/Makefile" ;;
@ -26967,6 +27140,7 @@ echo " Log file signing support: $enable_guardtime"
echo " Log file signing support via KSI: $enable_gt_ksi"
echo " Log file encryption support: $enable_libgcrypt"
echo " anonymization support enabled: $enable_mmanon"
echo " mmrm1stspace module enabled: $enable_mmrm1stspace"
echo " message counting support enabled: $enable_mmcount"
echo " mmfields enabled: $enable_mmfields"
echo " liblogging-stdlog support enabled: $enable_liblogging_stdlog"
@ -27005,6 +27179,7 @@ echo "---{ parser modules }---"
echo " pmlastmsg module will be compiled: $enable_pmlastmsg"
echo " pmcisconames module will be compiled: $enable_pmcisconames"
echo " pmciscoios module will be compiled: $enable_pmciscoios"
echo " pmnull module will be compiled: $enable_pmnull"
echo " pmaixforwardedfrom module w.be compiled: $enable_pmaixforwardedfrom"
echo " pmsnare module will be compiled: $enable_pmsnare"
echo " pmpanngfw module will be compiled: $enable_pmpanngfw"
@ -27019,6 +27194,7 @@ echo " mmutf8fix enabled: $enable_mmutf8fix"
echo " mmrfc5424addhmac enabled: $enable_mmrfc5424addhmac"
echo " mmpstrucdata enabled: $enable_mmpstrucdata"
echo " mmsequence enabled: $enable_mmsequence"
echo " mmdblookup enabled: $enable_mmdblookup"
echo
echo "---{ database support }---"
echo " MySql support enabled: $enable_mysql"

106
configure.ac

@ -2,7 +2,35 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([rsyslog],[8.23.0],[rsyslog@lists.adiscon.com])
AC_INIT([rsyslog],[8.24.0],[rsyslog@lists.adiscon.com])
# AIXPORT START: Detect the underlying OS
unamestr=$(uname)
AM_CONDITIONAL([AIX], [test x$unamestr = xAIX])
# AIXPORT END
# AIXPORT START : Set the required variables for AIX config script
if test "$unamestr" = "AIX"; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/pkgconfig"
LIBS="-lbsd -lsrc"
CPPFLAGS="-D_THREAD_SAFE -D_BSD43 -D_AIX"
CFLAGS="-D_AIX"
LDFLAGS="-qcpluscmt -brtl -bexpall -bE:strippedsymbols.exp "
LIBESTR_LIBS="-L/usr/lib/ -lestr"
LIBESTR_CFLAGS="-I/usr/include"
LIBLOGGING_STDLOG_LIBS="-L/usr/lib/ -llogging-stdlog"
LIBLOGGING_STDLOG_CFLAGS="-I/usr/include"
GNUTLS_LIBS="-L/usr/lib/ -lgnutls"
GNUTLS_CFLAGS="-I/usr/include"
RELP_LIBS="-L/usr/lib/ -lrelp"
RELP_CFLAGS="-I/usr/include"
CC="xlc_r"
AC_PREFIX_DEFAULT(/usr)
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
fi
# AIXPORT END
AM_INIT_AUTOMAKE([subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@ -19,6 +47,11 @@ AC_PROG_YACC
AC_PROG_CC
AC_PROG_CC_C99
AC_DISABLE_STATIC
# AIXPORT START: enable dlopen
if test "$unamestr" = "AIX"; then
AC_LIBTOOL_DLOPEN