diff options
author | Michael Biebl <biebl@debian.org> | 2013-04-25 15:08:24 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2013-04-25 15:08:24 +0200 |
commit | 4b0c6b727da98c61470fa2de20396ba6f284c417 (patch) | |
tree | 022cd5fdacf7f72abf2bee6b0f4612457bb39d4b /runtime | |
parent | bd9408b88c40fb9a7dc88f4b2b6f218fcb17a388 (diff) | |
download | rsyslog-4b0c6b727da98c61470fa2de20396ba6f284c417.tar.gz |
Imported Upstream version 7.3.12upstream/7.3.12
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/Makefile.am | 2 | ||||
-rw-r--r-- | runtime/Makefile.in | 2 | ||||
-rw-r--r-- | runtime/libgcry.c | 2 | ||||
-rw-r--r-- | runtime/libgcry.h | 4 | ||||
-rw-r--r-- | runtime/librsgt.c | 3 | ||||
-rw-r--r-- | runtime/lmcry_gcry.c | 5 | ||||
-rw-r--r-- | runtime/lmsig_gt.c | 8 | ||||
-rw-r--r-- | runtime/queue.c | 2 | ||||
-rw-r--r-- | runtime/rsyslog.h | 16 | ||||
-rw-r--r-- | runtime/stream.c | 3 |
10 files changed, 19 insertions, 28 deletions
diff --git a/runtime/Makefile.am b/runtime/Makefile.am index fd8dd3f..3015c3c 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -133,7 +133,7 @@ pkglib_LTLIBRARIES += lmnet.la lmnetstrms.la # lmnet_la_SOURCES = net.c net.h lmnet_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) -lmnet_la_LDFLAGS = -module -avoid-version +lmnet_la_LDFLAGS = -module -avoid-version ../compat/compat_la-getifaddrs.lo lmnet_la_LIBADD = # network stream master class and stream factory diff --git a/runtime/Makefile.in b/runtime/Makefile.in index a5df967..37a75df 100644 --- a/runtime/Makefile.in +++ b/runtime/Makefile.in @@ -615,7 +615,7 @@ librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBGCRYPT_LIBS) $(LIBEE_LIBS) # @ENABLE_INET_TRUE@lmnet_la_SOURCES = net.c net.h @ENABLE_INET_TRUE@lmnet_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) -@ENABLE_INET_TRUE@lmnet_la_LDFLAGS = -module -avoid-version +@ENABLE_INET_TRUE@lmnet_la_LDFLAGS = -module -avoid-version ../compat/compat_la-getifaddrs.lo @ENABLE_INET_TRUE@lmnet_la_LIBADD = # network stream master class and stream factory diff --git a/runtime/libgcry.c b/runtime/libgcry.c index e57ee8b..51c10af 100644 --- a/runtime/libgcry.c +++ b/runtime/libgcry.c @@ -238,7 +238,7 @@ addPadding(gcryfile pF, uchar *buf, size_t *plen) unsigned i; size_t nPad; nPad = (pF->blkLength - *plen % pF->blkLength) % pF->blkLength; - dbgprintf("DDDD: addPadding %d chars, blkLength %d, mod %d, pad %d\n", + DBGPRINTF("libgcry: addPadding %d chars, blkLength %d, mod %d, pad %d\n", *plen, pF->blkLength, *plen % pF->blkLength, nPad); for(i = 0 ; i < nPad ; ++i) buf[(*plen)+i] = 0x00; diff --git a/runtime/libgcry.h b/runtime/libgcry.h index 5dde157..b77b0f9 100644 --- a/runtime/libgcry.h +++ b/runtime/libgcry.h @@ -20,7 +20,7 @@ */ #ifndef INCLUDED_LIBGCRY_H #define INCLUDED_LIBGCRY_H -#include <gt_base.h> +#include <stdint.h> struct gcryctx_s { @@ -93,7 +93,9 @@ rsgcryModename2Mode(char *modename) { if(!strcmp((char*)modename, "STREAM")) return GCRY_CIPHER_MODE_STREAM; if(!strcmp((char*)modename, "OFB")) return GCRY_CIPHER_MODE_OFB; if(!strcmp((char*)modename, "CTR")) return GCRY_CIPHER_MODE_CTR; +# ifdef GCRY_CIPHER_MODE_AESWRAP if(!strcmp((char*)modename, "AESWRAP")) return GCRY_CIPHER_MODE_AESWRAP; +# endif return GCRY_CIPHER_MODE_NONE; } #endif /* #ifndef INCLUDED_LIBGCRY_H */ diff --git a/runtime/librsgt.c b/runtime/librsgt.c index afafe2f..ae0b0df 100644 --- a/runtime/librsgt.c +++ b/runtime/librsgt.c @@ -148,6 +148,7 @@ rsgtfileConstruct(gtctx ctx) goto done; gf->ctx = ctx; gf->hashAlg = ctx->hashAlg; + gf->blockSizeLimit = ctx->blockSizeLimit; gf->bKeepRecordHashes = ctx->bKeepRecordHashes; gf->bKeepTreeHashes = ctx->bKeepTreeHashes; gf->x_prev = NULL; @@ -775,7 +776,7 @@ done: static int timestampIt(gtfile gf, GTDataHash *hash) { - unsigned char *der; + unsigned char *der = NULL; size_t lenDer; int r = GT_OK; int ret = 0; diff --git a/runtime/lmcry_gcry.c b/runtime/lmcry_gcry.c index 2e4cfff..0a9b94b 100644 --- a/runtime/lmcry_gcry.c +++ b/runtime/lmcry_gcry.c @@ -69,7 +69,6 @@ errfunc(__attribute__((unused)) void *usrptr, uchar *emsg) /* Standard-Constructor */ BEGINobjConstruct(lmcry_gcry) - dbgprintf("DDDD: lmcry_gcry: called construct\n"); pThis->ctx = gcryCtxNew(); ENDobjConstruct(lmcry_gcry) @@ -77,7 +76,6 @@ ENDobjConstruct(lmcry_gcry) /* destructor for the lmcry_gcry object */ BEGINobjDestruct(lmcry_gcry) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(lmcry_gcry) - dbgprintf("DDDD: lmcry_gcry: called destruct\n"); rsgcryCtxDel(pThis->ctx); ENDobjDestruct(lmcry_gcry) @@ -198,7 +196,6 @@ OnFileOpen(void *pT, uchar *fn, void *pGF) lmcry_gcry_t *pThis = (lmcry_gcry_t*) pT; gcryfile *pgf = (gcryfile*) pGF; DEFiRet; -dbgprintf("DDDD: cry: onFileOpen: %s\n", fn); CHKiRet(rsgcryInitCrypt(pThis->ctx, pgf, fn)); finalize_it: @@ -213,7 +210,6 @@ static rsRetVal Encrypt(void *pF, uchar *rec, size_t *lenRec) { DEFiRet; -dbgprintf("DDDD: Encrypt (%u): %s\n", *lenRec-1, rec); iRet = rsgcryEncrypt(pF, rec, lenRec); RETiRet; @@ -223,7 +219,6 @@ static rsRetVal OnFileClose(void *pF, off64_t offsLogfile) { DEFiRet; -dbgprintf("DDDD: onFileClose\n"); gcryfileDestruct(pF, offsLogfile); RETiRet; diff --git a/runtime/lmsig_gt.c b/runtime/lmsig_gt.c index 0969129..e9194c7 100644 --- a/runtime/lmsig_gt.c +++ b/runtime/lmsig_gt.c @@ -66,7 +66,6 @@ errfunc(__attribute__((unused)) void *usrptr, uchar *emsg) /* Standard-Constructor */ BEGINobjConstruct(lmsig_gt) - dbgprintf("DDDD: lmsig_gt: called construct\n"); pThis->ctx = rsgtCtxNew(); rsgtsetErrFunc(pThis->ctx, errfunc, NULL); ENDobjConstruct(lmsig_gt) @@ -75,7 +74,6 @@ ENDobjConstruct(lmsig_gt) /* destructor for the lmsig_gt object */ BEGINobjDestruct(lmsig_gt) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(lmsig_gt) - dbgprintf("DDDD: lmsig_gt: called destruct\n"); rsgtCtxDel(pThis->ctx); ENDobjDestruct(lmsig_gt) @@ -133,7 +131,7 @@ OnFileOpen(void *pT, uchar *fn, void *pGF) lmsig_gt_t *pThis = (lmsig_gt_t*) pT; gtfile *pgf = (gtfile*) pGF; DEFiRet; -dbgprintf("DDDD: onFileOpen: %s\n", fn); + DBGPRINTF("lmsig_gt: onFileOpen: %s\n", fn); /* note: if *pgf is set to NULL, this auto-disables GT functions */ *pgf = rsgtCtxOpenFile(pThis->ctx, fn); sigblkInit(*pgf); @@ -152,7 +150,7 @@ static rsRetVal OnRecordWrite(void *pF, uchar *rec, rs_size_t lenRec) { DEFiRet; -dbgprintf("DDDD: onRecordWrite (%d): %s\n", lenRec-1, rec); + DBGPRINTF("lmsig_gt: onRecordWrite (%d): %s\n", lenRec-1, rec); sigblkAddRecord(pF, rec, lenRec-1); RETiRet; @@ -162,7 +160,7 @@ static rsRetVal OnFileClose(void *pF) { DEFiRet; -dbgprintf("DDDD: onFileClose\n"); + DBGPRINTF("lmsig_gt: onFileClose\n"); rsgtfileDestruct(pF); RETiRet; diff --git a/runtime/queue.c b/runtime/queue.c index 74090a4..600b568 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1150,7 +1150,6 @@ tryShutdownWorkersWithinActionTimeout(qqueue_t *pThis) DBGOPRINT((obj_t*) pThis, "trying to shutdown workers within Action Timeout"); DBGOPRINT((obj_t*) pThis, "setting EnqOnly mode\n"); pThis->bEnqOnly = 1; -dbgprintf("DDDD: setting shutdownImmediate mode, ptr %p!\n", &pThis->bShutdownImmediate); pThis->bShutdownImmediate = 1; /* now DA queue */ if(pThis->bIsDA) { @@ -1856,7 +1855,6 @@ ConsumerReg(qqueue_t *pThis, wti_t *pWti) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &iCancelStateSave); -dbgprintf("DDDD: calling consumer with shutdownImmeditate ptr %p\n", &pThis->bShutdownImmediate); CHKiRet(pThis->pConsumer(pThis->pAction, &pWti->batch, &pThis->bShutdownImmediate)); /* we now need to check if we should deliberately delay processing a bit diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h index 9fdf2b0..a901d2e 100644 --- a/runtime/rsyslog.h +++ b/runtime/rsyslog.h @@ -61,9 +61,9 @@ * rgerhards, 2006-11-30 */ -#define CONF_OMOD_NUMSTRINGS_MAXSIZE 3 /* cache for pointers to output module buffer pointers. All - * rsyslog-provided plugins do NOT need more than three buffers. If - * more are needed (future developments, third-parties), rsyslog +#define CONF_OMOD_NUMSTRINGS_MAXSIZE 5 /* cache for pointers to output module buffer pointers. All + * rsyslog-provided plugins do NOT need more than five buffers. If + * more are needed (future developments, third-parties), rsyslog * must be recompiled with a larger parameter. Hardcoding this * saves us some overhead, both in runtime in code complexity. As * it is doubtful if ever more than 3 parameters are needed, the @@ -91,7 +91,7 @@ /* the rsyslog core provides information about present feature to plugins - * asking it. Below are feature-test macros which must be used to query + * asking it. Below are feature-test macros which must be used to query * features. Note that this must be powers of two, so that multiple queries * can be combined. -- rgerhards, 2009-04-27 */ @@ -153,7 +153,7 @@ typedef uintTiny propid_t; */ enum rsRetVal_ /** return value. All methods return this if not specified otherwise */ { - /* the first two define are for errmsg.logError(), so that we can use the rsRetVal + /* the first two define are for errmsg.logError(), so that we can use the rsRetVal * as an rsyslog error code. -- rgerhards, 20080-06-27 */ RS_RET_NO_ERRCODE = -1, /**< RESERVED for NO_ERRCODE errmsg.logError status name */ @@ -448,7 +448,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth /** Object ID. These are for internal checking. Each * object is assigned a specific ID. This is contained in - * all Object structs (just like C++ RTTI). We can use + * all Object structs (just like C++ RTTI). We can use * this field to see if we have been passed a correct ID. * Other than that, there is currently no other use for * the object id. @@ -480,7 +480,7 @@ typedef enum rsObjectID rsObjID; #endif /** - * This macro should be used to free objects. + * This macro should be used to free objects. * It aids in interpreting dumps during debugging. */ #ifdef NDEBUG @@ -547,7 +547,7 @@ rsRetVal rsrtSetErrLogger(rsRetVal (*errLogger)(int, uchar*)); /* TODO: remove this -- this is only for transition of the config system */ extern rsconf_t *ourConf; /* defined by syslogd.c, a hack for functions that do not - yet receive a copy, so that we can incrementially + yet receive a copy, so that we can incrementially compile and change... -- rgerhars, 2011-04-19 */ #endif /* multi-include protection */ diff --git a/runtime/stream.c b/runtime/stream.c index b0df841..b781324 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -255,7 +255,6 @@ doPhysOpen(strm_t *pThis) pThis->bIsTTY = 0; } -dbgprintf("DDDD: cryprov %p\n", pThis->cryprov); if(pThis->cryprov != NULL) { CHKiRet(pThis->cryprov->OnFileOpen(pThis->cryprovData, pThis->pszCurrFName, &pThis->cryprovFileData)); @@ -1218,11 +1217,9 @@ strmPhysWrite(strm_t *pThis, uchar *pBuf, size_t lenBuf) CHKiRet(strmOpenFile(pThis)); /* here we place our crypto interface */ -dbgprintf("DDDD: doing crypto, len %d\n", lenBuf); if(pThis->cryprov != NULL) { pThis->cryprov->Encrypt(pThis->cryprovFileData, pBuf, &lenBuf); } -dbgprintf("DDDD: done crypto, len %d\n", lenBuf); /* end crypto */ iWritten = lenBuf; |