summaryrefslogtreecommitdiff
path: root/plugins/imuxsock
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-10-21 17:03:33 +0200
committerMichael Biebl <biebl@debian.org>2011-10-21 17:03:33 +0200
commita7a3afdd81c8809fbc4927b360e1cb59e2e16b2e (patch)
tree87efee7c0a74d351e4d88e52a5b84fbd4b3b191d /plugins/imuxsock
parentae82a633a4d42dfdc942d8f0f4f5e6470f13797e (diff)
downloadrsyslog-a7a3afdd81c8809fbc4927b360e1cb59e2e16b2e.tar.gz
Imported Upstream version 5.8.6upstream/5.8.6
Diffstat (limited to 'plugins/imuxsock')
-rw-r--r--plugins/imuxsock/Makefile.in1
-rw-r--r--plugins/imuxsock/imuxsock.c15
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/imuxsock/Makefile.in b/plugins/imuxsock/Makefile.in
index f8721fe..b9a6617 100644
--- a/plugins/imuxsock/Makefile.in
+++ b/plugins/imuxsock/Makefile.in
@@ -244,7 +244,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
moddirs = @moddirs@
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index af034b9..2697c48 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;
}