diff -u rsyslog-4.2.0/debian/rsyslog.init rsyslog-4.2.0/debian/rsyslog.init --- rsyslog-4.2.0/debian/rsyslog.init +++ rsyslog-4.2.0/debian/rsyslog.init @@ -25,6 +25,8 @@ RSYSLOGD_BIN=/usr/sbin/rsyslogd RSYSLOGD_OPTIONS="-c4" RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid +KMSG_PIDFILE=/var/run/rsyslog/kmsgpipe.pid +KMSG_PIPE=/var/run/rsyslog/kmsg SCRIPTNAME=/etc/init.d/$NAME @@ -43,6 +45,15 @@ DAEMON_ARGS="$RSYSLOGD_OPTIONS" PIDFILE="$RSYSLOGD_PIDFILE" + # create syslog-writeable pid and fifo directory + mkdir -p /var/run/rsyslog + chown syslog:syslog /var/run/rsyslog + mkfifo -m 600 $KMSG_PIPE + chown syslog:syslog $KMSG_PIPE + + # shovel /proc/kmsg to pipe readable by syslog user + start-stop-daemon --start --pidfile $KMSG_PIDFILE --exec /bin/dd -b -m -- if=/proc/kmsg of=$KMSG_PIPE + # Return # 0 if daemon has been started # 1 if daemon was already running @@ -60,16 +71,10 @@ # 1 if daemon was already stopped # other if daemon could not be stopped or a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME -} -# -# Tell rsyslogd to reload its configuration -# -do_reload() { - NAME="$RSYSLOGD" - PIDFILE="$RSYSLOGD_PIDFILE" - - start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --name $NAME + # stop kmsgpipe + start-stop-daemon --stop --quiet --oknodo --pidfile $KMSG_PIDFILE + rm -f $KMSG_PIDFILE $KMSG_PIPE } create_xconsole() { @@ -86,6 +91,8 @@ mkdir -p $OMITDIR rm -f $OMITDIR/rsyslog ln -s $RSYSLOGD_PIDFILE $OMITDIR/rsyslog + rm -f $OMITDIR/rsyslog-kmsg + ln -s $KMSG_PIDFILE $OMITDIR/rsyslog-kmsg } case "$1" in @@ -113,12 +120,7 @@ esac ;; - reload|force-reload) - log_daemon_msg "Reloading $DESC" "$RSYSLOGD" - do_reload - log_end_msg $? - ;; - restart) + reload|force-reload|restart) $0 stop $0 start ;; diff -u rsyslog-4.2.0/debian/control rsyslog-4.2.0/debian/control --- rsyslog-4.2.0/debian/control +++ rsyslog-4.2.0/debian/control @@ -1,7 +1,8 @@ Source: rsyslog Section: admin Priority: important -Maintainer: Michael Biebl +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Michael Biebl Build-Depends: debhelper (>= 7.0.9), quilt, autotools-dev, zlib1g-dev, libmysqlclient15-dev, libpq-dev, libkrb5-dev, libgnutls-dev, librelp-dev, pkg-config Standards-Version: 3.8.2 Vcs-Git: git://git.debian.org/git/collab-maint/rsyslog.git @@ -13,7 +14,7 @@ Priority: important Conflicts: system-log-daemon, linux-kernel-log-daemon Provides: system-log-daemon, linux-kernel-log-daemon -Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14) +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14), adduser, ucf (>= 0.8) Recommends: logrotate Suggests: rsyslog-mysql | rsyslog-pgsql, rsyslog-doc, rsyslog-gnutls, rsyslog-gssapi, rsyslog-relp Description: enhanced multi-threaded syslogd diff -u rsyslog-4.2.0/debian/rsyslog.postinst rsyslog-4.2.0/debian/rsyslog.postinst --- rsyslog-4.2.0/debian/rsyslog.postinst +++ rsyslog-4.2.0/debian/rsyslog.postinst @@ -66,6 +66,29 @@ fi done fi + + local user_conf=/etc/rsyslog.d/50-default.conf + local default_conf=/usr/share/rsyslog/50-default.conf + + # Upgrade handling for config file. We copy syslog.conf if it exists and + # is modified, else use our default fresh-install config. + if dpkg --compare-versions "$2" lt "3.22.0-1ubuntu1"; then + local pkg_name=sysklogd + local old_conf=/etc/syslog.conf + if [ -e $old_conf ]; then + local md5sum="`md5sum \"$old_conf\" | sed -e \"s/ .*//\"`" + local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $pkg_name | \ + sed -n -e "\' $old_conf ' { s/ obsolete$//; s/.* //; p }")" + if [ "$md5sum" != "$old_md5sum" ]; then + cp -n $old_conf $user_conf + fi + fi + fi + + ucf --three-way --debconf-ok $default_conf $user_conf + ucfr rsyslog $user_conf + + adduser --system --group --no-create-home --quiet syslog || true ;; abort-upgrade|abort-remove|abort-deconfigure) diff -u rsyslog-4.2.0/debian/rsyslog.postrm rsyslog-4.2.0/debian/rsyslog.postrm --- rsyslog-4.2.0/debian/rsyslog.postrm +++ rsyslog-4.2.0/debian/rsyslog.postrm @@ -10,6 +10,20 @@ [ -f /etc/logrotate.d/rsyslog.disabled ] && rm -f /etc/logrotate.d/rsyslog.disabled fi +if [ "$1" = "purge" ]; then + if which ucfr >/dev/null; then + ucfr --purge rsyslog /etc/rsyslog.d/50-default.conf + fi + if which ucf >/dev/null; then + ucf --purge /etc/rsyslog.d/50-default.conf + fi + if [ -d /etc/rsyslog.d ]; then + rm -f /etc/rsyslog.d/50-default.conf + rmdir --ignore-fail-on-non-empty /etc/rsyslog.d + fi + deluser --system --quiet syslog +fi + #DEBHELPER# exit 0 diff -u rsyslog-4.2.0/debian/rsyslog.install rsyslog-4.2.0/debian/rsyslog.install --- rsyslog-4.2.0/debian/rsyslog.install +++ rsyslog-4.2.0/debian/rsyslog.install @@ -1,4 +1,5 @@ debian/rsyslog.conf /etc/ +debian/50-default.conf /usr/share/rsyslog debian/tmp/usr/sbin/ debian/tmp/usr/share/man/ debian/tmp/usr/lib/rsyslog/imfile.so diff -u rsyslog-4.2.0/debian/rsyslog.conf rsyslog-4.2.0/debian/rsyslog.conf --- rsyslog-4.2.0/debian/rsyslog.conf +++ rsyslog-4.2.0/debian/rsyslog.conf @@ -2,6 +2,8 @@ # # For more information see # /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +# +# Default logging rules can be found in /etc/rsyslog.d/50-default.conf ################# @@ -12,6 +14,8 @@ $ModLoad imklog # provides kernel logging support (previously done by rklogd) #$ModLoad immark # provides --MARK-- message capability +$KLogPath /var/run/rsyslog/kmsg + # provides UDP syslog reception #$ModLoad imudp #$UDPServerRun 514 @@ -42,75 +46,8 @@ +$PrivDropToUser syslog +$PrivDropToGroup syslog # # Include all config files in /etc/rsyslog.d/ # $IncludeConfig /etc/rsyslog.d/*.conf - -############### -#### RULES #### -############### - -# -# First some standard log files. Log by facility. -# -auth,authpriv.* /var/log/auth.log -*.*;auth,authpriv.none -/var/log/syslog -#cron.* /var/log/cron.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -lpr.* -/var/log/lpr.log -mail.* -/var/log/mail.log -user.* -/var/log/user.log - -# -# Logging for the mail system. Split it up so that -# it is easy to write scripts to parse these files. -# -mail.info -/var/log/mail.info -mail.warn -/var/log/mail.warn -mail.err /var/log/mail.err - -# -# Logging for INN news system. -# -news.crit /var/log/news/news.crit -news.err /var/log/news/news.err -news.notice -/var/log/news/news.notice - -# -# Some "catch-all" log files. -# -*.=debug;\ - auth,authpriv.none;\ - news.none;mail.none -/var/log/debug -*.=info;*.=notice;*.=warn;\ - auth,authpriv.none;\ - cron,daemon.none;\ - mail,news.none -/var/log/messages - -# -# Emergencies are sent to everybody logged in. -# -*.emerg * - -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -# news.=crit;news.=err;news.=notice;\ -# *.=debug;*.=info;\ -# *.=notice;*.=warn /dev/tty8 - -# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, -# you must invoke `xconsole' with the `-file' option: -# -# $ xconsole -file /dev/xconsole [...] -# -# NOTE: adjust the list below, or you'll go crazy if you have a reasonably -# busy site.. -# -daemon.*;mail.*;\ - news.err;\ - *.=debug;*.=info;\ - *.=notice;*.=warn |/dev/xconsole diff -u rsyslog-4.2.0/debian/changelog rsyslog-4.2.0/debian/changelog --- rsyslog-4.2.0/debian/changelog +++ rsyslog-4.2.0/debian/changelog @@ -1,3 +1,28 @@ +rsyslog (4.2.0-1ubuntu1) karmic; urgency=low + + * Run as rsyslog:rsyslog (LP: #250827, LP: #388608) + - debian/control: Depend on adduser + - debian/rsyslog.postinst: Create syslog user + - debian/rsyslog.postrm: Delete syslog user on purge + - debian/rsyslog.conf: Use DropPriv config fields + * Allow reading /proc/kmsg when non-root + - debian/rsyslog.init: Spawn a dd instance that shovels the /proc/kmsg + data to a pipe that rsyslog can read (based on Martin Pitt's similar + change to sysklogd). + - debian/patches/deroot.patch: Support a KLogPath config field + to change where the klog plugin looks and only start input modules + after we drop privileges, as reading when root interferes with + future reads as syslog. + - debian/rsyslog.conf: Use KLogPath field to point to dd pipe + * Cleanly upgrade from sysklogd + - debian/default.conf, debian/rsyslog.conf: + Break out the default rules into their own config file + - debian/rsyslog.install: Install it in /usr/share/rsyslog + - debian/rsyslog.postinst: If present, copy /etc/syslog.conf into + /etc/rsyslog.d/default.conf. Then merge our own default.conf + + -- Michael Terry Mon, 29 Jun 2009 08:37:43 -0400 + rsyslog (4.2.0-1) unstable; urgency=low * New upstream release of the now stable v4 branch. diff -u rsyslog-4.2.0/debian/patches/series rsyslog-4.2.0/debian/patches/series --- rsyslog-4.2.0/debian/patches/series +++ rsyslog-4.2.0/debian/patches/series @@ -2,0 +3 @@ +deroot.patch only in patch2: unchanged: --- rsyslog-4.2.0.orig/debian/50-default.conf +++ rsyslog-4.2.0/debian/50-default.conf @@ -0,0 +1,68 @@ +# Default rules for rsyslog v3. +# +# For more information see rsyslog.conf(5) and /etc/rsyslog.conf + +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +#cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log + +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err + +# +# Logging for INN news system. +# +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice + +# +# Some "catch-all" log files. +# +*.=debug;\ + auth,authpriv.none;\ + news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ + auth,authpriv.none;\ + cron,daemon.none;\ + mail,news.none -/var/log/messages + +# +# Emergencies are sent to everybody logged in. +# +*.emerg * + +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 + +# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, +# you must invoke `xconsole' with the `-file' option: +# +# $ xconsole -file /dev/xconsole [...] +# +# NOTE: adjust the list below, or you'll go crazy if you have a reasonably +# busy site.. +# +daemon.*;mail.*;\ + news.err;\ + *.=debug;*.=info;\ + *.=notice;*.=warn |/dev/xconsole only in patch2: unchanged: --- rsyslog-4.2.0.orig/debian/patches/deroot.patch +++ rsyslog-4.2.0/debian/patches/deroot.patch @@ -0,0 +1,266 @@ +Index: rsyslog-4.2.0/tools/syslogd.c +=================================================================== +--- rsyslog-4.2.0.orig/tools/syslogd.c 2009-06-22 13:11:10.000000000 -0400 ++++ rsyslog-4.2.0/tools/syslogd.c 2009-06-29 08:36:34.000000000 -0400 +@@ -2291,6 +2291,30 @@ + } + + ++/* Actually run the input modules. This happens after privileges are dropped, ++ * if that is requested. ++ */ ++static rsRetVal ++runInputModules(void) ++{ ++ DEFiRet; ++ modInfo_t *pMod; ++ ++ /* loop through all modules and activate them (brr...) */ ++ pMod = module.GetNxtType(NULL, eMOD_IN); ++ while(pMod != NULL) { ++ if(pMod->mod.im.bCanRun) { ++ /* activate here */ ++ thrdCreate(pMod->mod.im.runInput, pMod->mod.im.afterRun); ++ } ++ pMod = module.GetNxtType(pMod, eMOD_IN); ++ } ++ ++ ENDfunc ++ return RS_RET_OK; /* intentional: we do not care about module errors */ ++} ++ ++ + /* Start the input modules. This function will probably undergo big changes + * while we implement the input module interface. For now, it does the most + * important thing to get at least my poor initial input modules up and +@@ -2298,7 +2322,7 @@ + * rgerhards, 2007-12-14 + */ + static rsRetVal +-startInputModules(void) ++startInputModules(int bRunInputModules) + { + DEFiRet; + modInfo_t *pMod; +@@ -2306,15 +2330,18 @@ + /* loop through all modules and activate them (brr...) */ + pMod = module.GetNxtType(NULL, eMOD_IN); + while(pMod != NULL) { +- if((iRet = pMod->mod.im.willRun()) == RS_RET_OK) { +- /* activate here */ +- thrdCreate(pMod->mod.im.runInput, pMod->mod.im.afterRun); +- } else { ++ iRet = pMod->mod.im.willRun(); ++ pMod->mod.im.bCanRun = (iRet == RS_RET_OK); ++ if(!pMod->mod.im.bCanRun) { + dbgprintf("module %lx will not run, iRet %d\n", (unsigned long) pMod, iRet); + } + pMod = module.GetNxtType(pMod, eMOD_IN); + } + ++ if (bRunInputModules) { ++ runInputModules(); ++ } ++ + ENDfunc + return RS_RET_OK; /* intentional: we do not care about module errors */ + } +@@ -2326,7 +2353,7 @@ + * else happens. -- rgerhards, 2008-07-28 + */ + static rsRetVal +-init(void) ++init(int bRunInputModules) + { + DEFiRet; + rsRetVal localRet; +@@ -2521,7 +2548,7 @@ + * shuffled to down here once we have everything in input modules. + * rgerhards, 2007-12-14 + */ +- startInputModules(); ++ startInputModules(bRunInputModules); + + if(Debug) { + dbgPrintInitInfo(); +@@ -2694,7 +2721,7 @@ + + if(glbl.GetHUPisRestart()) { + DBGPRINTF("Received SIGHUP, configured to be restart, reloading rsyslogd.\n"); +- init(); /* main queue is stopped as part of init() */ ++ init(1); /* main queue is stopped as part of init() */ + } else { + DBGPRINTF("Received SIGHUP, configured to be a non-restart type of HUP - notifying actions.\n"); + for(f = Files; f != NULL ; f = f->f_next) { +@@ -2987,7 +3014,7 @@ + pTmp = template_StdPgSQLFmt; + tplLastStaticInit(tplAddLine(" StdPgSQLFmt", &pTmp)); + +- CHKiRet(init()); ++ CHKiRet(init(0)); + + if(Debug && debugging_on) { + dbgprintf("Debugging enabled, SIGUSR1 to turn off debugging.\n"); +@@ -3016,6 +3043,8 @@ + } + + ++ runInputModules(); ++ + /* END OF INTIALIZATION + * ... but keep in mind that we might do a restart and thus init() might + * be called again. If that happens, we must shut down the worker thread, +Index: rsyslog-4.2.0/plugins/imklog/bsd.c +=================================================================== +--- rsyslog-4.2.0.orig/plugins/imklog/bsd.c 2009-06-14 06:25:11.000000000 -0400 ++++ rsyslog-4.2.0/plugins/imklog/bsd.c 2009-06-29 08:33:01.000000000 -0400 +@@ -83,6 +83,11 @@ + # define _PATH_KLOG "/dev/klog" + #endif + ++static uchar *GetPath(void) ++{ ++ return pszPath ? pszPath : _PATH_KLOG; ++} ++ + /* open the kernel log - will be called inside the willRun() imklog + * entry point. -- rgerhards, 2008-04-09 + */ +@@ -91,9 +96,9 @@ + { + DEFiRet; + +- fklog = open(_PATH_KLOG, O_RDONLY, 0); ++ fklog = open(GetPath(), O_RDONLY, 0); + if (fklog < 0) { +- dbgprintf("can't open %s (%d)\n", _PATH_KLOG, errno); ++ dbgprintf("can't open %s (%d)\n", GetPath(), errno); + iRet = RS_RET_ERR; // TODO: better error code + } + +Index: rsyslog-4.2.0/plugins/imklog/imklog.c +=================================================================== +--- rsyslog-4.2.0.orig/plugins/imklog/imklog.c 2009-06-22 13:11:10.000000000 -0400 ++++ rsyslog-4.2.0/plugins/imklog/imklog.c 2009-06-29 08:33:01.000000000 -0400 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include "dirty.h" + #include "cfsysline.h" +@@ -68,6 +69,7 @@ + int symbol_lookup = 0; /* on recent kernels > 2.6, the kernel does this */ + int bPermitNonKernel = 0; /* permit logging of messages not having LOG_KERN facility */ + int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */ ++uchar *pszPath = NULL; + /* TODO: configuration for the following directives must be implemented. It + * was not done yet because we either do not yet have a config handler for + * that type or I thought it was acceptable to push it to a later stage when +@@ -244,6 +246,8 @@ + /* release objects we used */ + objRelease(glbl, CORE_COMPONENT); + objRelease(datetime, CORE_COMPONENT); ++ if(pszPath != NULL) ++ free(pszPath); + ENDmodExit + + +@@ -260,6 +264,10 @@ + symfile = NULL; + symbol_lookup = 0; + bPermitNonKernel = 0; ++ if(pszPath != NULL) { ++ free(pszPath); ++ pszPath = NULL; ++ } + iFacilIntMsg = klogFacilIntMsg(); + return RS_RET_OK; + } +@@ -274,6 +282,7 @@ + iFacilIntMsg = klogFacilIntMsg(); + + CHKiRet(omsdRegCFSLineHdlr((uchar *)"debugprintkernelsymbols", 0, eCmdHdlrBinary, NULL, &dbgPrintSymbols, STD_LOADABLE_MODULE_ID)); ++ CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogpath", 0, eCmdHdlrGetWord, NULL, &pszPath, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogsymbollookup", 0, eCmdHdlrBinary, NULL, &symbol_lookup, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogsymbolstwice", 0, eCmdHdlrBinary, NULL, &symbols_twice, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogusesyscallinterface", 0, eCmdHdlrBinary, NULL, &use_syscall, STD_LOADABLE_MODULE_ID)); +Index: rsyslog-4.2.0/plugins/imklog/imklog.h +=================================================================== +--- rsyslog-4.2.0.orig/plugins/imklog/imklog.h 2009-06-14 06:25:11.000000000 -0400 ++++ rsyslog-4.2.0/plugins/imklog/imklog.h 2009-06-29 08:33:01.000000000 -0400 +@@ -52,6 +52,7 @@ + extern char *symfile; + extern int console_log_level; + extern int dbgPrintSymbols; ++extern uchar *pszPath; + + /* the functions below may be called by the drivers */ + rsRetVal imklogLogIntMsg(int priority, char *fmt, ...) __attribute__((format(printf,2, 3))); +Index: rsyslog-4.2.0/plugins/imklog/linux.c +=================================================================== +--- rsyslog-4.2.0.orig/plugins/imklog/linux.c 2009-06-18 05:11:03.000000000 -0400 ++++ rsyslog-4.2.0/plugins/imklog/linux.c 2009-06-29 08:33:37.000000000 -0400 +@@ -84,6 +84,11 @@ + extern int ksyslog(int type, char *buf, int len); + + ++static uchar *GetPath(void) ++{ ++ return pszPath ? pszPath : _PATH_KLOG; ++} ++ + static void CloseLogSrc(void) + { + /* Turn on logging of messages to console, but only if we had the -c +@@ -135,7 +140,7 @@ + * file system is available to get kernel messages from. + */ + if ( use_syscall || +- ((stat(_PATH_KLOG, &sb) < 0) && (errno == ENOENT)) ) ++ ((stat(GetPath(), &sb) < 0) && (errno == ENOENT)) ) + { + /* Initialize kernel logging. */ + ksyslog(1, NULL, 0); +@@ -144,14 +149,14 @@ + return(kernel); + } + +- if ( (kmsg = open(_PATH_KLOG, O_RDONLY|O_CLOEXEC)) < 0 ) ++ if ( (kmsg = open(GetPath(), O_RDONLY|O_CLOEXEC)) < 0 ) + { + imklogLogIntMsg(LOG_ERR, "imklog: Cannot open proc file system, %d.\n", errno); + ksyslog(7, NULL, 0); /* TODO: check this, implement more */ + return(none); + } + +- imklogLogIntMsg(LOG_INFO, "imklog %s, log source = %s started.", VERSION, _PATH_KLOG); ++ imklogLogIntMsg(LOG_INFO, "imklog %s, log source = %s started.", VERSION, GetPath()); + return(proc); + } + +Index: rsyslog-4.2.0/runtime/modules.c +=================================================================== +--- rsyslog-4.2.0.orig/runtime/modules.c 2009-06-22 13:11:10.000000000 -0400 ++++ rsyslog-4.2.0/runtime/modules.c 2009-06-29 08:33:01.000000000 -0400 +@@ -390,6 +390,7 @@ + CHKiRet((*pNew->modQueryEtryPt)((uchar*)"runInput", &pNew->mod.im.runInput)); + CHKiRet((*pNew->modQueryEtryPt)((uchar*)"willRun", &pNew->mod.im.willRun)); + CHKiRet((*pNew->modQueryEtryPt)((uchar*)"afterRun", &pNew->mod.im.afterRun)); ++ pNew->mod.im.bCanRun = 0; + break; + case eMOD_OUT: + CHKiRet((*pNew->modQueryEtryPt)((uchar*)"freeInstance", &pNew->freeInstance)); +Index: rsyslog-4.2.0/runtime/modules.h +=================================================================== +--- rsyslog-4.2.0.orig/runtime/modules.h 2009-06-22 13:11:10.000000000 -0400 ++++ rsyslog-4.2.0/runtime/modules.h 2009-06-29 08:33:01.000000000 -0400 +@@ -106,6 +106,7 @@ + rsRetVal (*runInput)(thrdInfo_t*); /* function to gather input and submit to queue */ + rsRetVal (*willRun)(void); /* function to gather input and submit to queue */ + rsRetVal (*afterRun)(thrdInfo_t*); /* function to gather input and submit to queue */ ++ int bCanRun; /* cached value of whether willRun() succeeded */ + } im; + struct {/* data for output modules */ + /* below: perform the configured action