mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 15:10:42 +01:00
Merge branch 'beta'
Conflicts: ChangeLog
This commit is contained in:
commit
86614327c5
@ -4,6 +4,7 @@ Version 4.1.1 [DEVEL] (rgerhards), 2008-11-??
|
|||||||
$PrivDropToUserID config directives to enable dropping privileges.
|
$PrivDropToUserID config directives to enable dropping privileges.
|
||||||
This is an effort to provide a security enhancement. For the limits of this
|
This is an effort to provide a security enhancement. For the limits of this
|
||||||
approach, see http://wiki.rsyslog.com/index.php/Security
|
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
|
Version 4.1.0 [DEVEL] (rgerhards), 2008-11-18
|
||||||
|
|
||||||
@ -40,6 +41,9 @@ version before switching to this one.
|
|||||||
- bugfix: memory leak in ompgsql
|
- bugfix: memory leak in ompgsql
|
||||||
Thanks to Ken for providing the patch
|
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
|
Version 3.21.7 [BETA] (rgerhards), 2008-11-11
|
||||||
- this is the new beta branch, based on the former 3.21.6 devel
|
- this is the new beta branch, based on the former 3.21.6 devel
|
||||||
- new functionality: ZERO property replacer nomatch option (from v3-stable)
|
- new functionality: ZERO property replacer nomatch option (from v3-stable)
|
||||||
|
|||||||
@ -116,7 +116,7 @@ readklog(void)
|
|||||||
uchar bufRcv[4096+1];
|
uchar bufRcv[4096+1];
|
||||||
uchar *pRcv = NULL; /* receive buffer */
|
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
|
/* 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
|
* 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) {
|
if((size_t) iMaxLine < sizeof(bufRcv) - 1) {
|
||||||
pRcv = bufRcv;
|
pRcv = bufRcv;
|
||||||
} else {
|
} 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;
|
len = 0;
|
||||||
@ -161,7 +162,6 @@ readklog(void)
|
|||||||
if (len > 0)
|
if (len > 0)
|
||||||
Syslog(LOG_INFO, pRcv);
|
Syslog(LOG_INFO, pRcv);
|
||||||
|
|
||||||
finalize_it:
|
|
||||||
if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1)
|
if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1)
|
||||||
free(pRcv);
|
free(pRcv);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
BEGINrunInput
|
||||||
CODESTARTrunInput
|
CODESTARTrunInput
|
||||||
/* this is an endless loop - it is terminated when the thread is
|
/* this is an endless loop - it is terminated when the thread is
|
||||||
|
|||||||
@ -58,6 +58,7 @@ rsRetVal imklogLogIntMsg(int priority, char *fmt, ...) __attribute__((format(pri
|
|||||||
rsRetVal Syslog(int priority, uchar *msg);
|
rsRetVal Syslog(int priority, uchar *msg);
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
|
extern int klog_getMaxLine(void); /* work-around for klog drivers to get configured max line size */
|
||||||
extern int InitKsyms(char *);
|
extern int InitKsyms(char *);
|
||||||
extern void DeinitKsyms(void);
|
extern void DeinitKsyms(void);
|
||||||
extern int InitMsyms(void);
|
extern int InitMsyms(void);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user