summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r--usr.sbin/syslogd/syslogd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index b1f2f77..4cdf5b4 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -269,6 +269,7 @@ int NumAllowed = 0; /* # of AllowedPeer entries */
int UniquePriority = 0; /* Only log specified priority? */
int LogFacPri = 0; /* Put facility and priority in log message: */
/* 0=no, 1=numeric, 2=names */
+int KeepKernFac = 0; /* Keep remotely logged kernel facility */
int allowaddr __P((char *));
void cfline __P((char *, struct filed *, char *, char *));
@@ -311,7 +312,7 @@ main(argc, argv)
pid_t ppid = 1;
socklen_t len;
- while ((ch = getopt(argc, argv, "a:dl:f:m:p:nsuv")) != -1)
+ while ((ch = getopt(argc, argv, "a:df:kl:m:np:suv")) != -1)
switch (ch) {
case 'a': /* allow specific network addresses only */
if (allowaddr(optarg) == -1)
@@ -323,6 +324,9 @@ main(argc, argv)
case 'f': /* configuration file */
ConfFile = optarg;
break;
+ case 'k': /* keep remote kern fac */
+ KeepKernFac = 1;
+ break;
case 'l':
if (nfunix < MAXFUNIX)
funixn[nfunix++] = optarg;
@@ -580,7 +584,7 @@ printline(hname, msg)
pri = DEFUPRI;
/* don't allow users to log kernel messages */
- if (LOG_FAC(pri) == LOG_KERN)
+ if (LOG_FAC(pri) == LOG_KERN && !KeepKernFac)
pri = LOG_MAKEPRI(LOG_USER, LOG_PRI(pri));
q = line;
OpenPOWER on IntegriCloud