summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-20 15:40:01 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-20 15:40:01 +0000
commit4d53a1e6a3519b6fb7f1bb201a8a735a8e73218f (patch)
tree83b2a87e0987ea0363cb0272e4510fce493ad1d0 /syslogd.c
parent66214d45c76220ceb2d76ff1881baf79bee147a3 (diff)
downloadrsyslog-4d53a1e6a3519b6fb7f1bb201a8a735a8e73218f.tar.gz
rsyslog-4d53a1e6a3519b6fb7f1bb201a8a735a8e73218f.tar.xz
rsyslog-4d53a1e6a3519b6fb7f1bb201a8a735a8e73218f.zip
moved part of the shell action to its own module
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c10
1 files changed, 8 insertions, 2 deletions
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();