[Bug 643] klogd logs message tagged with user.xxx
bugzilla at busybox.net
bugzilla at busybox.net
Sun Dec 13 01:38:31 UTC 2009
https://bugs.busybox.net/show_bug.cgi?id=643
--- Comment #2 from Denys Vlasenko <vda.linux at googlemail.com> 2009-12-13 01:38:29 UTC ---
This is very strange, since LOG_KERN is (0<<3), in other words, it's zero.
Thus, ORing LOG_KERN to anything is a NOP.
This is code from 1.4.1:
openlog("kernel", 0, LOG_KERN);
...
priority = LOG_INFO;
for (i = 0; i < n; i++) {
if (lastc == '\0' && log_buffer[i] == '<') {
i++;
// kernel never ganerates multi-digit prios
//priority = 0;
//while (log_buffer[i] >= '0' && log_buffer[i]
<= '9') {
// priority = priority * 10 +
(log_buffer[i] - '0');
// i++;
//}
if (isdigit(log_buffer[i])) {
priority = (log_buffer[i] - '0');
i++;
}
if (log_buffer[i] == '>')
i++;
start = &log_buffer[i];
}
if (log_buffer[i] == '\n') {
log_buffer[i] = '\0'; /* zero terminate this
message */
syslog(priority, "%s", start);
As you see, it uses LOG_KERN in openlog() and does not use anything to override
it in priority parameter in syslog().
And last, could you please re-test it with less ancient version of busybox?
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list