FreeBSD Bugzilla – Attachment 163083 Details for
Bug 200933
syslog is not RFC-compliant when receiving remote UDP messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
The patch should deal with the hostname in the message.
syslogd.c.diff (text/plain), 794 bytes, created by
Maxim Konovalov
on 2015-11-13 09:27:28 UTC
(
hide
)
Description:
The patch should deal with the hostname in the message.
Filename:
MIME Type:
Creator:
Maxim Konovalov
Created:
2015-11-13 09:27:28 UTC
Size:
794 bytes
patch
obsolete
>Index: syslogd.c >=================================================================== >--- syslogd.c (revision 287682) >+++ syslogd.c (working copy) >@@ -909,7 +909,7 @@ > logmsg(int pri, const char *msg, const char *from, int flags) > { > struct filed *f; >- int i, fac, msglen, omask, prilev; >+ int i, j, fac, msglen, omask, prilev; > const char *timestamp; > char prog[NAME_MAX+1]; > char buf[MAXLINE+1]; >@@ -956,6 +956,19 @@ > > prilev = LOG_PRI(pri); > >+ /* skip hostname, see RFC 3164 */ >+ for (i = 0, j = 0; i < NAME_MAX; i++) { >+ if (isspace(msg[i])) { >+ j = i + 1; >+ } >+ if (msg[i] == ':') >+ break; >+ } >+ if (j <= msglen) { >+ msg += j; >+ msglen -= j; >+ } >+ > /* extract program name */ > for (i = 0; i < NAME_MAX; i++) { > if (!isprint(msg[i]) || msg[i] == ':' || msg[i] == '[' ||
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 200933
:
163083
|
188379
|
188530