From 4d53a1e6a3519b6fb7f1bb201a8a735a8e73218f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 20 Jul 2007 15:40:01 +0000 Subject: moved part of the shell action to its own module --- syslogd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index c3784846..a103e04b 100644 --- a/syslogd.c +++ b/syslogd.c @@ -239,6 +239,7 @@ #include "parse.h" #include "srUtils.h" #include "msg.h" +#include "omshell.h" /* We define our own set of syslog defintions so that we * do not need to rely on (possibly different) implementations. @@ -5713,6 +5714,8 @@ void fprintlog(register selector_t *f) #endif case F_SHELL: /* shell support by bkalkbrenner 2005-09-20 */ + doActionShell(f, now); +#if 0 /* TODO: using f->f_un.f_file.f_name is not clean from the point of * modularization. We'll change that as we go ahead with modularization. * rgerhards, 2007-07-20 @@ -5723,6 +5726,7 @@ void fprintlog(register selector_t *f) psz = iovAsString(f); if(execProg((uchar*) f->f_un.f_file.f_fname, 1, (uchar*) psz) == 0) logerrorSz("Executing program '%s' failed", f->f_un.f_file.f_fname); +#endif break; } /* switch */ @@ -9042,7 +9046,7 @@ int main(int argc, char **argv) funix[i] = -1; } - while ((ch = getopt(argc, argv, "46Aa:dehi:f:l:m:nop:r::s:t:u:vwx")) != EOF) + while ((ch = getopt(argc, argv, "46Aa:dehi:f:l:m:nop:r::s:t:u:vwx")) != EOF) { switch((char)ch) { case '4': family = PF_INET; @@ -9159,10 +9163,12 @@ int main(int argc, char **argv) case 'x': /* disable dns for remote messages */ DisableDNS = 1; break; - case '?': + case '?': default: usage(); } + } + if ((argc -= optind)) usage(); -- cgit