Merge branch 'beta'

Conflicts:

	ChangeLog
This commit is contained in:
Rainer Gerhards 2008-11-26 14:22:52 +01:00
commit 86614327c5
4 changed files with 19 additions and 3 deletions

View File

@ -4,6 +4,7 @@ Version 4.1.1 [DEVEL] (rgerhards), 2008-11-??
$PrivDropToUserID config directives to enable dropping privileges.
This is an effort to provide a security enhancement. For the limits of this
approach, see http://wiki.rsyslog.com/index.php/Security
- re-enabled imklog to compile on FreeBSD (brought in from beta)
---------------------------------------------------------------------------
Version 4.1.0 [DEVEL] (rgerhards), 2008-11-18
@ -40,6 +41,9 @@ version before switching to this one.
- bugfix: memory leak in ompgsql
Thanks to Ken for providing the patch
---------------------------------------------------------------------------
Version 3.21.8 [BETA] (rgerhards), 2008-11-??
- bugfix: imklog did not compile on FreeBSD
---------------------------------------------------------------------------
Version 3.21.7 [BETA] (rgerhards), 2008-11-11
- this is the new beta branch, based on the former 3.21.6 devel
- new functionality: ZERO property replacer nomatch option (from v3-stable)

View File

@ -116,7 +116,7 @@ readklog(void)
uchar bufRcv[4096+1];
uchar *pRcv = NULL; /* receive buffer */
iMaxLine = glbl.GetMaxLine();
iMaxLine = klog_getMaxLine();
/* we optimize performance: if iMaxLine is below 4K (which it is in almost all
* cases, we use a fixed buffer on the stack. Only if it is higher, heap memory
@ -127,7 +127,8 @@ readklog(void)
if((size_t) iMaxLine < sizeof(bufRcv) - 1) {
pRcv = bufRcv;
} else {
CHKmalloc(pRcv = (uchar*) malloc(sizeof(uchar) * (iMaxLine + 1)));
if((pRcv = (uchar*) malloc(sizeof(uchar) * (iMaxLine + 1))) == NULL)
iMaxLine = sizeof(bufRcv) - 1; /* better this than noting */
}
len = 0;
@ -161,7 +162,6 @@ readklog(void)
if (len > 0)
Syslog(LOG_INFO, pRcv);
finalize_it:
if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1)
free(pRcv);
}

View File

@ -199,6 +199,17 @@ finalize_it:
}
/* helper for some klog drivers which need to know the MaxLine global setting. They can
* not obtain it themselfs, because they are no modules and can not query the object hander.
* It would probably be a good idea to extend the interface to support it, but so far
* we create a (sufficiently valid) work-around. -- rgerhards, 2008-11-24
*/
int klog_getMaxLine(void)
{
return glbl.GetMaxLine();
}
BEGINrunInput
CODESTARTrunInput
/* this is an endless loop - it is terminated when the thread is

View File

@ -58,6 +58,7 @@ rsRetVal imklogLogIntMsg(int priority, char *fmt, ...) __attribute__((format(pri
rsRetVal Syslog(int priority, uchar *msg);
/* prototypes */
extern int klog_getMaxLine(void); /* work-around for klog drivers to get configured max line size */
extern int InitKsyms(char *);
extern void DeinitKsyms(void);
extern int InitMsyms(void);