summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-09-26 12:12:48 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-09-26 12:12:48 +0200
commit76b4c6547d5526a375ee217e2722a164c811c58c (patch)
treecbcca91a01d64106e3b26480d08c7e8766735d2b /plugins
parent0509f1404170c5aff7c9a154fbe882f4d067b1e4 (diff)
parentb26387e6b28630b8e5e3582039141ebf1c7455e3 (diff)
downloadrsyslog-76b4c6547d5526a375ee217e2722a164c811c58c.tar.gz
rsyslog-76b4c6547d5526a375ee217e2722a164c811c58c.tar.bz2
rsyslog-76b4c6547d5526a375ee217e2722a164c811c58c.zip
Merge branch 'v5-stable' into beta
Conflicts: ChangeLog configure.ac doc/manual.html
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imuxsock/imuxsock.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index cbf87d7f..b3007d19 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -6,7 +6,7 @@
*
* File begun on 2007-12-20 by RGerhards (extracted from syslogd.c)
*
- * Copyright 2007-2010 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2011 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
@@ -355,7 +355,7 @@ createLogSocket(lstn_t *pLstn)
pLstn->fd = socket(AF_UNIX, SOCK_DGRAM, 0);
if(pLstn->fd < 0 || bind(pLstn->fd, (struct sockaddr *) &sunx, SUN_LEN(&sunx)) < 0 ||
chmod((char*)pLstn->sockName, 0666) < 0) {
- errmsg.LogError(errno, NO_ERRCODE, "connot create '%s'", pLstn->sockName);
+ errmsg.LogError(errno, NO_ERRCODE, "cannot create '%s'", pLstn->sockName);
dbgprintf("cannot create %s (%d).\n", pLstn->sockName, errno);
close(pLstn->fd);
pLstn->fd = -1;
@@ -564,14 +564,19 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred)
parse++; lenMsg--; /* '>' */
- if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) {
- DBGPRINTF("we have a problem, invalid timestamp in msg!\n");
+ if((pLstn->flags & IGNDATE)) {
+ parse += 16; /* just skip timestamp */
+ lenMsg -= 16;
+ } else {
+ if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) {
+ DBGPRINTF("we have a problem, invalid timestamp in msg!\n");
+ }
}
/* pull tag */
i = 0;
- while(lenMsg > 0 && *parse != ' ' && i < CONF_TAG_MAXSIZE) {
+ while(lenMsg > 0 && *parse != ' ' && i < CONF_TAG_MAXSIZE - 1) {
bufParseTAG[i++] = *parse++;
--lenMsg;
}