Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: New syslog output could be improved
Bernd Ernesti schrieb:
So, the user output now adds a newline at the begining of the output,
the sequence number and cuts off the output at the end of the line.
Looks like a bug to me. Please file a PR.
Done. bin/39857
A patch is appended.
The newline and "Message from syslogd" should only be printed for wall
messages. The truncation was caused by a wrong offset.
--
Martin
--- syslogd.c.orig 2008-11-03 00:11:07.000000000 +0100
+++ syslogd.c 2008-11-03 00:38:54.000000000 +0100
@@ -2225,14 +2225,13 @@
*p = FORCE2ASCII(*p);
p++;
}
- v->iov_base = line;
+ v->iov_base = line + tlsprefixlen + prilen;
v->iov_len = linelen - tlsprefixlen - prilen;
ADDEV();
v->iov_base = crnl;
v->iov_len = 2;
ADDEV();
break;
- case F_USERS:
case F_WALL:
v->iov_base = greetings;
v->iov_len = snprintf(greetings, sizeof(greetings),
@@ -2240,13 +2239,14 @@
(buffer->host ? buffer->host : buffer->recvhost),
buffer->timestamp);
ADDEV();
+ case F_USERS: /* fallthrough */
/* filter non-ASCII */
p = line;
while (*p) {
*p = FORCE2ASCII(*p);
p++;
}
- v->iov_base = line;
+ v->iov_base = line + tlsprefixlen + prilen;
v->iov_len = linelen - tlsprefixlen - prilen;
ADDEV();
v->iov_base = &crnl[1];
Home |
Main Index |
Thread Index |
Old Index