summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-18 10:36:36 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-18 10:36:36 +0000
commit7a2eb66a0a0fde6ed263a035eb2eeeba483c604b (patch)
treea3e4911ddba7ff7faff50f00208d5663a76999e9
parent95c21c07dae3e8d8ab888a71b10c738506b4e354 (diff)
downloadrsyslog-7a2eb66a0a0fde6ed263a035eb2eeeba483c604b.tar.gz
rsyslog-7a2eb66a0a0fde6ed263a035eb2eeeba483c604b.tar.xz
rsyslog-7a2eb66a0a0fde6ed263a035eb2eeeba483c604b.zip
applied cleanup patch by Peter Vrabec
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac4
-rwxr-xr-xsrUtils.c1
-rw-r--r--syslogd.c10
4 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d6ace851..ea55873e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
---------------------------------------------------------------------------
Version 1.17.1 (RGer), 2007-07-??
+- fixed a bug that caused make install to install rsyslogd and rklogd under
+ the wrong names
+- fixed bug that caused $AllowedSenders to handle IPv6 scopes incorrectly;
+ also fixed but that could grabble $AllowedSender wildcards. Thanks to
+ mildew@gmail.com for the patch
---------------------------------------------------------------------------
Version 1.17.0 (RGer), 2007-07-17
- added $RepeatedLineReduction config parameter
diff --git a/configure.ac b/configure.ac
index 1806ca50..fa8d93f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,9 @@ AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
-
+if test "$GCC" = "yes"
+then CFLAGS="$CFLAGS -W -Wall -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+fi
AC_CANONICAL_HOST
case "${host}" in
diff --git a/srUtils.c b/srUtils.c
index 376a0d16..39219e10 100755
--- a/srUtils.c
+++ b/srUtils.c
@@ -153,6 +153,7 @@ int makeFileParentDirs(uchar *szFile, size_t lenFile, mode_t mode,
*p = '/';
}
free(pszWork);
+ return 0;
}
/*
* vi:set ai:
diff --git a/syslogd.c b/syslogd.c
index 4109f52e..2c05b0cc 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -888,7 +888,7 @@ static rsRetVal AddAllowedSenderEntry(struct AllowedSenders **ppRoot, struct All
static rsRetVal AddAllowedSender(struct AllowedSenders **ppRoot, struct AllowedSenders **ppLast,
struct NetAddr *iAllow, uint8_t iSignificantBits)
{
- rsRetVal iRet;
+ rsRetVal iRet = RS_RET_OK;
assert(ppRoot != NULL);
assert(ppLast != NULL);
@@ -1572,7 +1572,7 @@ static void TCPSessAccept(int fd)
int iSess;
struct sockaddr_storage addr;
socklen_t addrlen = sizeof(struct sockaddr_storage);
- int lenHostName;
+ size_t lenHostName;
uchar fromHost[NI_MAXHOST];
uchar fromHostFQDN[NI_MAXHOST];
char *pBuf;
@@ -7453,7 +7453,6 @@ static int doParseOnOffOption(uchar **pp)
{
char *pOptStart;
uchar szOpt[32];
- int iRet = -1;
assert(pp != NULL);
assert(*pp != NULL);
@@ -7463,7 +7462,7 @@ static int doParseOnOffOption(uchar **pp)
if(getSubString(pp, (char*) szOpt, sizeof(szOpt) / sizeof(uchar), ' ') != 0) {
logerror("Invalid $-configline - could not extract on/off option");
- return;
+ return -1;
}
if(!strcmp(szOpt, "on")) {
@@ -8922,12 +8921,11 @@ static rsRetVal cfline(char *line, register selector_t *f)
f->f_un.f_forw.port = NULL;
if(*p == ':') { /* process port */
- register int i = 0;
uchar * tmp;
*p = '\0'; /* trick to obtain hostname (later)! */
tmp = ++p;
- for( ; *p && isdigit((int) *p) ; ++p, ++i)
+ for(i=0 ; *p && isdigit((int) *p) ; ++p, ++i)
/* SKIP AND COUNT */;
f->f_un.f_forw.port = malloc(i + 1);
if(f->f_un.f_forw.port == NULL) {