Commit Graph

351 Commits

Author SHA1 Message Date
Joachim Nilsson
1a42935c2f Document log rotation command line options
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:47:21 +02:00
Joachim Nilsson
614cb78aef Install ChangeLog.md and example syslog.conf in doc/ and add to dist
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:30:11 +02:00
Joachim Nilsson
2fda4352ea Remove doc_DATE fro src/Makefile.am, archived now
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:29:45 +02:00
Joachim Nilsson
83fda541e2 Rename and do initial conversion to Markdown
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:26:22 +02:00
Joachim Nilsson
fc7e90d25a Archive old docs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:12:26 +02:00
Joachim Nilsson
5e7883318f Travis-CI: Remove ldd + size, for now
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:10:41 +02:00
Joachim Nilsson
221dc9ca8b Initial support for Travis-CI
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:07:53 +02:00
Joachim Nilsson
e6a88e13ed Replace version.h with auto-generated version from configure script
Also, remove DEBRELEASE, no longer a package with Debian focus, and add
'v' before version number in logs/usage text.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 23:02:49 +02:00
Joachim Nilsson
363b9a2201 Add new project README, with background and rationale
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 22:52:40 +02:00
Joachim Nilsson
880cb2aa4d Relocate files to man/ and src/ and change to GNU configure & build
- Relocate all source files to src/ and manual pages to man/
- Replace static Makefile with GNU configure and build system

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 22:52:40 +02:00
Joachim Nilsson
f4110c8571 Enable configuration of INET_SUSPEND_TIME from build system
When sysklogd is built with SYSLOG_INET the user can now optionally also
define the INET_SUSPEND_TIME.  The default is 180 sec, which may be a
bit too long for some systems.

In practice when a system comes up syslogd+klogd starts before all other
processes, even those that bring up the network, so waiting 3 minutes
before trying again to send to a remote syslog server would mean losing
a lot of info from the bootstrapping of a system.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:40:59 +02:00
Joachim Nilsson
a09150a061 Touch PID file on SIGHUP to ACK signal
When used with Finit a daemon is expected to acknowledge SIGHUP
by touching its PID file.  Finit can do this by itself, however,
but having native support for this in sysklgod is highly useful.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:37:02 +02:00
Joachim Nilsson
9c2d0cb9fc Ignore backed up console, continue writing when its unclogged
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:28:38 +02:00
Joachim Nilsson
678b309f71 Merge FreeBSD socket receive buffer size patch, SVN r259368
https://svnweb.freebsd.org/base/stable/10/usr.sbin/syslogd/syslogd.c?r1=256281&r2=259368

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:24:42 +02:00
Joachim Nilsson
b3aa3f4830 Add basic .gitignore file
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:16:29 +02:00
Joachim Nilsson
039bd99d10 Add support for built-in log rotation from BusyBox syslogd
Port log rotation from BusyBox syslogd, see SYSLOG_ROTATE_FILES.
This adds support for -b and -c options for size and rotate count.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:15:14 +02:00
Joachim Nilsson
aeba1d31b7 Fix build error with GCC v7.3, wait3() takes an int *status
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-02 15:12:59 +02:00
Joey Schulze
9abddd6b55 Document changes 2014-10-04 21:44:28 +02:00
mancha
5b156a9033 Bugfix against minor vulnerability caused by invalid PRI value (CVE-2014-3634)
Rainer Gerhards, rsyslog project leader, discovered an issue in rsyslogd
where invalid priority values can trigger DoS and potentially RCE.

As his analysis reveals, the cause of the problem identified in rsyslog's
rsyslogd also exists in sysklogd's syslogd (from which rsyslogd was forked)
and stems from the use of a (LOG_FACMASK|LOG_PRIMASK) mask to detect invalid
priority values.

In sysklogd's syslogd, invalid priority values between 192 and 1023 (directly
or arrived at via overflow wraparound) can propagate through code causing
out-of-bounds access to the f_pmask array within the 'filed' structure by up
to 104 bytes past its end. Though most likely insufficient to reach
unallocated memory because there are around 544 bytes past f_pmask in 'filed'
(mod packing and other differences), incorrect access of fields at higher
positions of the 'filed' structure definition can cause unexpected behavior
including message mis-classification, forwarding issues, message loss,
or other.

This patch imposes a restriction on PRI message parts and requires they
be properly-delimited priority value strings that have non-negative
numerical values not exceeding 191. As before, sysklogd's syslogd permits
zero padding to not break compatibility with RFC-non-compliant loggers that
issue PRIs such as <0091>. Messages without well-formed PRI parts get
logged with priority user.notice (13). (c.f. RFC 3164)

Thanks to Rainer Gerhards for the initial report and analysis.
2014-10-04 21:34:41 +02:00
Joey Schulze
2a80f8117f Replace strcpy with memmove to fix continuation line problems
on 64bit architectures, patch by David Couture.
2010-09-10 08:50:59 +02:00
Joey Schulze
b03656d74e Adjust changelog information 2009-12-24 20:20:49 +01:00
John Haxby
0c2f6712a7 IPv6 support
This patch, apparently, came from the freebsd syslogd.
The patch was subsequently lost although the old Fedora RPM can still
be found.

I took that patch, the current freebsd sources and a dash of salt to
produce a new patch which I have attached.

The patch does two things: it will arrange for syslogd to listen on an
IPv6 socket in addition to the IPv4 socket and it uses getaddrinfo()
and getnameinfo() rather than gethostby[name|addr] and getservbyname.
It would be possible to use a single socket that accepts both IPv6 and
IPv4 datagrams, but this would mean that numeric IPv4 addresses would
be prefixed with ::ffff and this could cause some confusion -- and I'm
also not sure that everything that sysklogd runs on has a dual stack
like that.

I've also introduced the -4, -6 and -A with the same meanings that the
freebsd and rsyslog variants do.
2009-12-24 20:19:00 +01:00
Joey Schulze
8640ed6f6f Documentation update 2009-11-27 21:54:06 +01:00
Joey Schulze
74d15498a0 Remove faulty fclose() call. Thanks to Andrea Morandi and Sean Young. 2008-07-04 14:48:42 +00:00
Joey Schulze
0bb8aa7194 Adjust indention 2008-05-11 17:05:24 +00:00
Joey Schulze
91b3e07d6e Correct logic: flush log files independed of MARK 2008-05-11 17:04:18 +00:00
Joey Schulze
7bded835a2 Correct calculation 2008-05-11 17:03:39 +00:00
Joey Schulze
5e3891ec45 Document "don't output marks to recently written files" 2008-05-11 16:57:41 +00:00
Joey Schulze
e7141b5d5f Added missing changelog entry 2008-05-08 19:43:09 +00:00
Joey Schulze
94e0cb4f54 Code reorganisation: make sure that the service name is only queried
when it is needed, i.e. when we are sending to or receiving from the
network
2008-05-07 21:00:39 +00:00
Joey Schulze
c5f9d2cd50 Thomas Jarosch: Move hostname setting code from main() into init() 2007-11-10 19:01:48 +00:00
Joey Schulze
be3066caa3 Improved sleep/alarm/mark implementation by
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2007-10-08 15:24:06 +00:00
Joey Schulze
7097243191 Adjusted indention 2007-10-08 09:43:48 +00:00
Joey Schulze
af1ce3b6bb Untypo 2007-07-29 17:37:07 +00:00
Joey Schulze
2a2ab0cb77 Prevent pipes from becoming the controlling tty 2007-07-04 19:04:02 +00:00
Joey Schulze
c972380fef Reverted patch by Andreas Barth since it caused problems with opening the pipe 2007-07-04 19:00:09 +00:00
Joey Schulze
e06d6174b5 Untypo 2007-07-04 17:36:05 +00:00
Joey Schulze
ad9ad3a68f Preparation for version 1.5 2007-07-04 17:35:22 +00:00
Joey Schulze
07ee28cdee Updated the changelog/documentation 2007-06-21 08:22:59 +00:00
Joey Schulze
1aa1cfdb64 Adjusted the search function to find the symbol associated with an
address when EIP address resolving is enabled.
2007-06-18 07:50:55 +00:00
Joey Schulze
fce0c596cd Beautification of the output 2007-06-17 19:21:55 +00:00
Joey Schulze
b438513313 Improved condition 2007-06-02 19:08:52 +00:00
Joey Schulze
5bfd6c6dce We need to read all symbols 2007-06-02 19:04:38 +00:00
Joey Schulze
640b1ba8e0 Improved symbol lookup, since symbols are spread over the entire
address space.  Return the symbol that fits best instead of the first hit.
2007-05-31 15:23:42 +00:00
Joey Schulze
017e328032 Only read kernel symbols from /proc/kallsyms if no System.map has been read 2007-05-31 14:52:20 +00:00
Joey Schulze
ade259a045 Formatting & untypo 2007-05-30 18:46:09 +00:00
Joey Schulze
2d16b292d4 Correction to build tsyslogd again 2007-05-30 15:43:45 +00:00
Joey Schulze
bdcaeb12ea Build the new oops module with the kernel build system 2007-05-30 15:28:48 +00:00
Joey Schulze
2309b99118 Complete rewrite of the oops kernel module for Linux 2.6 2007-05-30 15:27:13 +00:00
Joey Schulze
e0186e8a9f File not needed anymroe 2007-05-30 15:26:09 +00:00