Refactor test.rc, start.sh, and stop.sh into lib.sh that each test
sources and uses independently of each other.
More simplfication and cleanup needed.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The release suite fails with no permissions to dump loopback, so let's
run tests in an unshare, one per test, with and start as many syslogd as
needed for each test -- also easier to debug since all are then fully
stand-alone.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
GLIBC is friendly enough to check for NULL and replace segfault with
"(null)", but other C-libs may not handle it as gracefully.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
We're moving to automated releases using GitHub Actions, but the bots
cannot be trusted to do .deb packaging yet, so let's drop that from
the official release target for now.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- add build matrix with both gcc and clang
- run on all pushes and pull requests, except dev (coverity)
- use DESTDIR for install, not --prefix
- check install-strip with tree and ldd+size with usage
- add example w/ libsyslog, from .travis.yml
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch fixes integration with systemd-journald, and also sets the
now mandatory KillMode.
When running on systems with systemd-journald certain considerations
must be taken. These are listed here:
https://www.freedesktop.org/wiki/Software/systemd/syslog/
In it simplest form, the system as a whole logs through journald and
a BSD syslog daemon then gets its log messages from journald.
NOTE: due to issues with the Debian packaging of rsyslog, the sysklogd
packages cannot be used to replace rsyslog. First rsyslog must
be purged to clear the syslog.socket symlink, then sysklogd can
be installed.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When syncing with the FreeBSD man page the audit missed this option.
The man page should detail what the daemon does, even though in this
case it would've been nice to have the FreeBSD behahvior for -v.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
It is well established practise on Linux to use /dev/kmsg (old or
new API) before syslogd is up (and /dev/log exists). This patch
enables support for extracting non-kernel log messages and logging
them with their proper facility and priority.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch adds support for logging to /dev/kmsg, which can be highly
useful for early scripts that run long before syslogd has started and
/dev/log is available.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Coverity found two possible untrusted loop bounds, in unix_cb() and
inet_cb(), that were indeed possibly unterminated strings. These
were classified as medium. A third finding, marked high, was found
in kernel_cb(), which upon further investigation seems bogus.
This patch terminates the buffers received in unix_cb() and inet_cb()
but only changes to 0 from \0 termination in kernel_cb().
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>