diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-06 13:55:04 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-06 13:55:04 +0000 |
commit | dfb2142974bb93c357be88d866fb17ddd39c65f4 (patch) | |
tree | f03e2c689355ce47a0d688b49573211647ea9e33 /tcps_sess.c | |
parent | 8d36b9159f38815660b8c3b4a8e4ce48d0091bdc (diff) | |
download | rsyslog-dfb2142974bb93c357be88d866fb17ddd39c65f4.tar.gz rsyslog-dfb2142974bb93c357be88d866fb17ddd39c65f4.tar.xz rsyslog-dfb2142974bb93c357be88d866fb17ddd39c65f4.zip |
added capability to ignore client-provided timestamp on unix sockets and
made this mode the default; this was needed, as some programs (e.g.
sshd) log with inconsistent timezone information, what messes up the
local logs (which by default don't even contain time zone information).
This seems to be consistent with what sysklogd did for the past four
years. Alternate behaviour may be desirable if gateway-like processes
send messages via the local log slot - in this case, it can be enabled
via the $InputUnixListenSocketIgnoreMsgTimestamp and
$SystemLogSocketIgnoreMsgTimestamp config directives
Diffstat (limited to 'tcps_sess.c')
-rw-r--r-- | tcps_sess.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tcps_sess.c b/tcps_sess.c index f8f9f5bd..c86bcf8d 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -207,8 +207,7 @@ PrepareClose(tcps_sess_t *pThis) * this case. */ dbgprintf("Extra data at end of stream in legacy syslog/tcp message - processing\n"); - parseAndSubmitMessage(pThis->fromHost, pThis->msg, - pThis->iMsg, MSG_PARSE_HOSTNAME); + parseAndSubmitMessage(pThis->fromHost, pThis->msg, pThis->iMsg, MSG_PARSE_HOSTNAME, NOFLAG); pThis->bAtStrtOfFram = 1; } @@ -354,7 +353,7 @@ DataRcvd(tcps_sess_t *pThis, char *pData, size_t iLen) /* emergency, we now need to flush, no matter if * we are at end of message or not... */ - parseAndSubmitMessage(pThis->fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME); + parseAndSubmitMessage(pThis->fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME, NOFLAG); iMsg = 0; /* we might think if it is better to ignore the rest of the * message than to treat it as a new one. Maybe this is a good @@ -365,7 +364,7 @@ DataRcvd(tcps_sess_t *pThis, char *pData, size_t iLen) if(*pData == '\n' && pThis->eFraming == TCP_FRAMING_OCTET_STUFFING) { /* record delemiter? */ - parseAndSubmitMessage(pThis->fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME); + parseAndSubmitMessage(pThis->fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME, NOFLAG); iMsg = 0; pThis->bAtStrtOfFram = 1; ++pData; @@ -379,7 +378,7 @@ DataRcvd(tcps_sess_t *pThis, char *pData, size_t iLen) pThis->iOctetsRemain--; if(pThis->iOctetsRemain < 1) { /* we have end of frame! */ - parseAndSubmitMessage(pThis->fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME); + parseAndSubmitMessage(pThis->fromHost, pMsg, iMsg, MSG_PARSE_HOSTNAME, NOFLAG); iMsg = 0; pThis->bAtStrtOfFram = 1; } |