sysklogd 1.6: messages from klogd are logged to user facility
Dear Buildroot Team,
there is an issue with sysklogd 1.6 (buildroot 2020.02.3).
The package includes its own implementation of openlog/syslog/vsyslog in src/syslog.c to be able to log kernel messages to the kern facility. The included syslog/vsyslog functions are not the ones getting executed, thus kernel messages are marked with the user facility when they arrive in syslogd.
I guess there was a change in the Makefile or glibc 2.22-2.29 which results in taking precedence for these functions compared to sysklogd 1.5.1 (buildroot 2016.08).
Can you suggest a workaround/patch for this or are there plans to move to a newer version of sysklogd?
Or should we just switch to rsyslog/syslog-ng?
Thanks & best regards
Andreas Hilse
Hello Andreas,
Quoted 11 lines · On Wed, 5 Aug 2020 19:55:50 +0200 (CEST) Andreas Hilse…
there is an issue with sysklogd 1.6 (buildroot 2020.02.3).
The package includes its own implementation of openlog/syslog/vsyslog in
src/syslog.cto be able to log kernel messages to the kern facility. The included syslog/vsyslog functions are not the ones getting executed, thus kernel messages are marked with the user facility when they arrive in syslogd.
I guess there was a change in theMakefileor glibc 2.22-2.29 which results in taking precedence for these functions compared to sysklogd 1.5.1 (buildroot 2016.08).
Quoted 3 lines
Can you suggest a workaround/patch for this or are there plans to move to a newer version of sysklogd?
Or should we just switch to rsyslog/syslog-ng?
I am not really familiar with the internals of sysklogd, but there are definitely newer versions available:
https://github.com/troglobit/sysklogd/releases
Have you tried if version >= 2.0 would fix your issue ? It seems like version 2.0 is really a major rewrite.
In any case, we would very much welcome Buildroot patches to update sysklogd to a newer version.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Hello Thomas,
Quoted 5 lines
Have you tried if version >= 2.0 would fix your issue ? It seems like version 2.0 is really a major rewrite.
In any case, we would very much welcome Buildroot patches to update sysklogd to a newer version.
I hoped someone already ran into this issue and fixed it. I will try to upgrade to the rewritten 2.0 version then.
Best regards
Andreas
Hello Thomas,
Latest sysklogd 2.1.2 fixes the issue.
I'm trying to upgrade the sysklogd package and like to clarify some things before submitting a patch.
Package now provides its own logger tool which could interfere with the same from busybox or util-linux.
I already made it a selectable option in the Config.in but is there anything to be done concerning busybox/util-linux?
klogd has been removed from the package, functionality is now in syslogd.
Best regards
Andreas
Hello Andreas,
Quoted 7 lines · On Mon, 10 Aug 2020 10:39:06 +0200 (CEST) Andreas Hilse…
Latest sysklogd 2.1.2 fixes the issue.
I'm trying to upgrade the sysklogd package and like to clarify some things before submitting a patch.
Package now provides its own logger tool which could interfere with the same from busybox or util-linux.
Well, the overlap with Busybox already exists, and that's why Busybox has:
BUSYBOX_DEPENDENCIES = \
...
$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \This way Busybox is installed *after* sysklogd, and Busybox installation process is careful enough to not overwrite already installed binaries.
However, klogd being removed from sysklogd, I'm not sure how this will end up working: it is possible that Busybox will install its own klogd symlink anyway.
Quoted 2 lines
I already made it a selectable option in the Config.in but is there anything to be done concerning busybox/util-linux?
What have you made selectable ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Hello Thomas,
Quoted 10 lines
BUSYBOX_DEPENDENCIES = \ ... $(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \This way Busybox is installed *after* sysklogd, and Busybox installation process is careful enough to not overwrite already installed binaries.
However, klogd being removed from sysklogd, I'm not sure how this will end up working: it is possible that Busybox will install its own klogd symlink anyway.
It does install its own klogd symlink, but its S02klogd script does not get installed because BR2_PACKAGE_SYSKLOGD is selected, so it won't be started.
I just checked: the same goes for rsyslog (busybox klogd link gets installed). So it should be okay for sysklogd, too?
Quoted 1 line
What have you made selectable ?
The sysklogd logger utility; configure has an option:
--without-logger Build without extended logger tool, default:
enabled
In case of the logger utility both busybox link (/usr/bin/logger) and sysklogd binary (/bin/logger) get installed.
Best regards
Andreas