diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-12 14:49:07 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-12 14:49:07 +0200 |
commit | 70ee0f5b2e580b75782c039c5bb9d014a81195f4 (patch) | |
tree | 00f3b5ea032c9be211aa8b4847dd3d7da28752a6 | |
parent | 35f217ce69b6dbcdc16ff36ef02323ab3257d9df (diff) | |
parent | 9aacbcb05656ebc8838dfc421f7dc9fd21bbfcb3 (diff) | |
download | rsyslog-70ee0f5b2e580b75782c039c5bb9d014a81195f4.tar.gz rsyslog-70ee0f5b2e580b75782c039c5bb9d014a81195f4.tar.xz rsyslog-70ee0f5b2e580b75782c039c5bb9d014a81195f4.zip |
Merge branch 'v6-stable' into v6-devel
Conflicts:
ChangeLog
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 14 |
2 files changed, 10 insertions, 8 deletions
@@ -582,6 +582,10 @@ expected that interfaces, even new ones, break during the initial syslog plain tcp input plugin (NOT supporting TLS!) [ported from v4] --------------------------------------------------------------------------- +Version 5.10.1 [V5-STABLE], 2012-0?-?? +- bugfix: remove invalid socket option call from imuxsock + Thanks to Cristian Ionescu-Idbohrn and Jonny Törnbom +--------------------------------------------------------------------------- Version 5.10.0 [V5-STABLE], 2012-08-23 NOTE: this is the new rsyslog v5-stable, incorporating all changes from the diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index 57b2a70a..eb3011b2 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -81,7 +81,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a /* emulate struct ucred for platforms that do not have it */ #ifndef HAVE_SCM_CREDENTIALS -struct ucred { int pid; }; +struct ucred { int pid; uid_t uid; gid_t gid; }; #endif /* handle some defines missing on more than one platform */ @@ -486,7 +486,9 @@ static inline rsRetVal openLogSocket(lstn_t *pLstn) { DEFiRet; +# if HAVE_SCM_CREDENTIALS int one; +# endif /* HAVE_SCM_CREDENTIALS */ if(pLstn->sockName[0] == '\0') return -1; @@ -527,10 +529,6 @@ openLogSocket(lstn_t *pLstn) errmsg.LogError(errno, NO_ERRCODE, "set SO_PASSCRED failed on '%s'", pLstn->sockName); pLstn->bUseCreds = 0; } - if(setsockopt(pLstn->fd, SOL_SOCKET, SCM_CREDENTIALS, &one, sizeof(one)) != 0) { - errmsg.LogError(errno, NO_ERRCODE, "set SCM_CREDENTIALS failed on '%s'", pLstn->sockName); - pLstn->bUseCreds = 0; - } // TODO: move to its own #if if(setsockopt(pLstn->fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one)) != 0) { errmsg.LogError(errno, NO_ERRCODE, "set SO_TIMESTAMP failed on '%s'", pLstn->sockName); @@ -982,14 +980,14 @@ static rsRetVal readSocket(lstn_t *pLstn) int iMaxLine; struct msghdr msgh; struct iovec msgiov; -# if HAVE_SCM_CREDENTIALS struct cmsghdr *cm; -# endif struct ucred *cred; struct timeval *ts; uchar bufRcv[4096+1]; - char aux[128]; uchar *pRcv = NULL; /* receive buffer */ +# if HAVE_SCM_CREDENTIALS + char aux[128]; +# endif assert(pLstn->fd >= 0); |