36 Commits

Author SHA1 Message Date
Rainer Gerhards
0871d0a077 Merge branch 'v4-stable' into v5-stable
Conflicts:
	plugins/imfile/imfile.c
	plugins/omtesting/omtesting.c
	tcpsrv.c
	threads.c
2012-01-14 18:32:40 +01:00
Rainer Gerhards
ca39d8e60e more files moved to ASL 2.0 2012-01-12 03:29:19 +01:00
Bojan Smojver
d1eb6e0edc added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2011-02-23 11:25:43 +01:00
Rainer Gerhards
e04e1b5002 enhanced test environment (including testbench)
support for enhancing probability of memory addressing failure by
using non-NULL default value for malloced memory (optional, only if
requested by configure option). This helps to track down some
otherwise undetected issues within the testbench and is expected
to be very useful in the future.
2009-10-22 11:33:38 +02:00
Rainer Gerhards
e3d9843c85 re-enabled pipe, tty and console in omfile
... by moving code to stream.c. Thanks to the new design, new cases are
not really needed, resulting in cleaner code.

I also did a cleanup of header file usage as a side-activity.
2009-06-12 11:47:00 +02:00
Rainer Gerhards
8256a105cf some more changes to cater for new LogError() interface 2008-07-01 15:17:33 +02:00
varmojfekoj
d2b63414ef fixed potential segfault due to invalid call to cfsysline
thanks to varmojfekoj for the patch

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2008-05-14 08:32:40 +02:00
Rainer Gerhards
d9b0c77d3e some more cleanup
reduced dependencies, moved non-runtime files to its own directory except
for some whom's status is unclear
2008-04-16 15:27:53 +02:00
Rainer Gerhards
3a0060c6eb bugfix: omsnmp had a too-small sized buffer for hostname+port.
This could not lead to a segfault, as snprintf() was used, but could cause
some trouble with extensively long hostnames.
2008-04-10 08:43:53 +02:00
Rainer Gerhards
e2436a0104 bugfix: omsnmp did not deref errmsg object on exit (no bad effects caused) 2008-04-08 11:57:08 +02:00
Rainer Gerhards
52a4bdfa41 - added support for high-precision timestamps when receiving legacy syslog
messages
- added new $ActionForwardDefaultTemplate directive
- added new $ActionGSSForwardDefaultTemplate directive
2008-03-28 10:51:41 +00:00
Rainer Gerhards
cdcc0e6710 removed a now-longer needed callback from the output module interface.
Results in reducing code complexity.
2008-03-22 10:30:40 +00:00
b1a83de33a Updated the Adiscon MIBs, they contain a few more definitions for variables
and traps now. The default syslogmessage oid had to change again, as I
    had to reorganize the snmp variables.
2008-03-05 17:23:52 +00:00
Rainer Gerhards
24b02dc831 - extracted logerror*() family of functions from syslogd, made them their
own class and converted to new object calling conventions
    (interface-based)
- converted gss-misc into a loadable library module
2008-03-05 14:53:25 +00:00
05ba3fbffe Added custom mibs for the OMSNMP output module. These mibs are derived from
adiscon monitorware and will be used by default from now on. The mibs
    can be found in the mibs folder of the omsnmp directory. For more
    details please see the documentation. Also added a new configuration
    variable $actionsnmptrapoid which defines the trap-type or
    notification-type that is used.
2008-03-04 16:22:28 +00:00
d88634be6b Changed default SyslogMessageOID to 1.3.6.1.4.1.9.9.41.2.0.1 which means
CISCO-SYSLOG-MIB::clogMessageGenerated. This is a better choice as
    default OID for now. We will add our own MIB in a later step.
2008-03-04 10:36:59 +00:00
Rainer Gerhards
bc7d8ccebb - changed module interface to support querying obj interface (stage work)
- changed module interface version, as the interface change is quite large
2008-03-04 10:27:45 +00:00
Rainer Gerhards
15904a3538 created an initial version of omlibdbi (does not yet work) 2008-02-14 17:47:47 +00:00
Rainer Gerhards
e1ebc4be35 done a bit more cleanup on the "rsyslog way of doing things" 2008-02-12 07:40:34 +00:00
f4e7c64f91 Some major changes in the code. The SNMP Session is now stored in the
instance data. So this means we open and close the session only once
    per session. If sending fails, we reinit the snmp session, so suspend
    and resume is now fully and correctly supported. May need some more
    testing against tcp based snmp receivers.
2008-02-11 16:28:29 +00:00
Rainer Gerhards
ecfc30551b a bit more rsyslog-like 2008-02-11 14:56:26 +00:00
ad55b12ac9 Fixed minor bug finalize_it, pdu only needs to be cleaned if snmp_send
failed. Also added documentation to the omsnmp module.
2008-02-11 14:50:25 +00:00
Rainer Gerhards
de41d0b857 done some more work on omsnmp to bring it fully in line with recent rsyslog
developments
2008-02-11 14:00:37 +00:00
Rainer Gerhards
b97d794161 fixed typo 2008-02-11 12:00:49 +00:00
Rainer Gerhards
fbdee85530 adapted omsnmp to the rsyslog way of handling "exceptions" 2008-02-11 11:59:50 +00:00
f758dae5f0 replaced sprintf with more secure snprintf calls 2008-02-11 11:53:41 +00:00
Rainer Gerhards
db34f56bc7 some cosmetic cleanup 2008-02-11 11:51:48 +00:00
c1a8908b1e Added debug function logerrorVar, which can have variable number of
parameters. Replaced debug prints in omsnmp with logerrorVar where
    needed.
2008-02-11 10:25:18 +00:00
a2785882aa Added missing variable checks in modExit and CODESTARTmodExit 2008-02-11 09:54:20 +00:00
Rainer Gerhards
a9cde36fdc did some warning cleanup on snmp output module 2008-02-11 09:46:34 +00:00
34ca2b175c Did some code cleanup. Removed unused functions and variables. 2008-02-11 09:19:27 +00:00
a14121a19c Added support for SNMPv2, which is also default. Removed some debug code
and compiler warnings. Added support to define the transport type where
    udp is the default. This also enables ipv6 support if you have compiled
    net-snmp with it.
2008-02-08 16:48:48 +00:00
4b2fe0de3b Initially implemented snmp into this output module. The code contains a lot
of debug informations and additional stuff which is commented out. I
    will do some cleanup very soon.
What is implemented yet:
- SNMPv1 is supported (SNMPv2 will follow)
- SNMP Target, Port, Community, EnterpriseOID, TrapType and SpecificType
    can be configured. Sample will follow soon. A SyslogMessageOID can be
    configured as well, this OID will be used for a variable which will
    then contain the original syslogmessage.
2008-02-01 17:02:55 +00:00
Rainer Gerhards
7ddc251119 provided sample for integer config variable 2008-01-28 16:38:05 +00:00
Rainer Gerhards
15eb2b29c9 created a work-around for plugin interface issue 2008-01-25 19:30:13 +00:00
de0bfbbfef Module OMSNMP intially added, not completed yet. 2008-01-22 12:50:32 +00:00