The FreeBSD syslogd has more priority matching features and can also
group rules per program/hostname logging. The sysklogd project does
not yet support this, so that is removed and instead the syntax and
examples are better described.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Add missing -r option for log rotation and remove -8 option, which we
don't have yet.
Add SECURITY, DEBUGGING, and SIGNALS sections and expand upon the BUGS
section a bit to link things together.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and
are not defined in any standard. Using them fails build on musl
libc, its better to avoid them
Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Much less command line options (for now)
- Mention support for RFC3164 and RFC5424
- Add the history of the sysklogd project
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
With `klogd` removed and the original man pages replaced with FreeBSD
versions, the only remaining GPL'ed material was the build system, which
the copyright owner (undersigned) agrees to change to BSD as well.
Hence, the GNU GPL could be dropped in favor of the 3-clause BSD.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch replaces the original man pages by Greg and Martin, that were
both licensed under the GNU GPL, with 3-clause BSD licensed versions of
the same man pages from FreeBSD.
- syslogd.8 FreeBSD Subversion r335862
- syslog.conf.5 FreeBSD Subversion r314436
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch removes one of the traditionally key pieces of the sysklogd
project, klogd. Now that syslogd performs logging of kernel messages
we no longer require a separate daemon for that.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
When building the sysklogd project --without-klogd we must disable the
kernel logging to console on Linux. This fix depends on how the sysctl
setting `kernel.printk` is configured. The patch only calls the kernel
to set console_loglevel to minimum_console_loglevel.
See the kernel docs for details:
https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The changes in the timer handling are quite extensive, so we cannot in
good conscience call this a patch release.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Independently of each other both the Gentoo project and Westermo found
an issue with massively parallel builds on monster-core-machines. At
Westermo there are 40 core Xeon monsters that stumble when building
sysklogd.
The Gentoo bug report is here:
https://bugs.gentoo.org/701894
The problem stems from strlcat.c and strlcpy.c being used for both
the libcompat convenience library built for libsyslog and als for
syslogd when the system does not have either of the APIs in libc,
i.e. most Linux systems with GLIBC or musl libc.
I can either rewrite the Makefile.am files to handle dependencies
better, or we just disable parallel build like this patch. There's
too few source files to gain anything from parallel build anyway.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
We should make sure to also check that we don't get more MARK messages
than expected based on the -mMIN value.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds a alarm()/SIGALRM based generic timer API to syslogd.
The API takes care to wrap SIGALRM and serialize all timer events to
a standard UNIX pipe(2) which syslogd can poll() for like any other
incoming event.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This bug caused syslogd to fall back to logging to /dev/console for
internal log messages/errors during reconfiguration at runtime.
syslogd has the FreeBSD style of keeping already open log files ready
for logging until re:init() has completed, when new log files are rolled
in and any old ones not to be used anymore are closed.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Refactor of nslookup of unknown remote syslog servers, both when
(re)reading the .conf file and at runtime. This means we retry
DNS lookup every 30 sec, or INET_SUSPEND_TIME +/- 30 sec.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The domark() timer handles a lot of the critical maintenance action in
syslogd, it must always be guaranteed to run.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Only block signals *after* all sanity checking of log message has been
completed, otherwise we will end up with blocked SIGHUP and SIGALRM.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
We definitely want to be able to run syslogd in debug mode for extended
periods of time and still run under finit/systemd or similar, letting
users know we run as 'PID'.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
When logging to a remote server, using @fqdn syntax in syslog.conf,
syslogd calls getaddrinfo() to resolve the IP address. Older versions
of syslogd gave up after 10 retries. We want to retry forever since we
may be running in a setup with bad network connection to the DNS server
for longer periods of time.
This patch only removes the 'give up' mechanism, which unfortunately
reused the f_prevcount value, which in turn could cause that value to
become -1 and thus trigger an assert(). With this code out of the way,
and the type change in the previous commit, the counter can never again
be negative.
Note: The configurable suspend time before trying again remains at its
default of 3 minutes.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
When we fail sending to a remote host, help admin debug the issue by
stating which remote we failed to send to.
Also minor changes to other similar error messages, use same form.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>