diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2016-06-30 20:26:57 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:31:18 +0200 |
commit | d31c50870d0bee042ce660e445c9294a59a3a65b (patch) | |
tree | 6bfc0de3c95267b401b620c2c67859557dc60f97 /source/a/sysklogd | |
parent | 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff) | |
download | current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz |
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016
Slackware 14.2 x86_64 stable is released!
The long development cycle (the Linux community has lately been living in
"interesting times", as they say) is finally behind us, and we're proud to
announce the release of Slackware 14.2. The new release brings many updates
and modern tools, has switched from udev to eudev (no systemd), and adds
well over a hundred new packages to the system. Thanks to the team, the
upstream developers, the dedicated Slackware community, and everyone else
who pitched in to help make this release a reality.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
Have fun! :-)
Diffstat (limited to 'source/a/sysklogd')
-rw-r--r-- | source/a/sysklogd/config/rc.syslog.new | 23 | ||||
-rwxr-xr-x | source/a/sysklogd/sysklogd.SlackBuild | 9 | ||||
-rw-r--r-- | source/a/sysklogd/sysklogd.allow.repeated.messages.diff | 69 |
3 files changed, 92 insertions, 9 deletions
diff --git a/source/a/sysklogd/config/rc.syslog.new b/source/a/sysklogd/config/rc.syslog.new index 46208fab..f2b51d5e 100644 --- a/source/a/sysklogd/config/rc.syslog.new +++ b/source/a/sysklogd/config/rc.syslog.new @@ -3,11 +3,21 @@ # # Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>. +# Uncomment the following line to use the -c option to syslogd. This will +# disable suppressing repeated messages, which may be useful with tools that +# parse the logs, such as fail2ban: +#SYSLOGD_OPTIONS="-c " + +# Options for klogd: +# '-c 3' = display level 'error' or higher messages on console +# '-x' = turn off broken EIP translation +KLOGD_OPTIONS="-c 3 -x" + syslogd_start() { if [ -x /usr/sbin/syslogd -a -x /usr/sbin/klogd ]; then echo -n "Starting sysklogd daemons: " - echo -n "/usr/sbin/syslogd " - /usr/sbin/syslogd + echo -n "/usr/sbin/syslogd ${SYSLOGD_OPTIONS};" + /usr/sbin/syslogd $SYSLOGD_OPTIONS # prevent syslogd/klogd race condition on SMP kernels if ps acx | grep -q udevd ; then while [ ! -e /dev/log ] ; do @@ -16,10 +26,11 @@ syslogd_start() { else sleep 1 fi - echo "/usr/sbin/klogd -c 3 -x" - # '-c 3' = display level 'error' or higher messages on console - # '-x' = turn off broken EIP translation - /usr/sbin/klogd -c 3 -x + # Run klogd, unless we are in a container: + if [ -z $container ]; then + echo " /usr/sbin/klogd $KLOGD_OPTIONS" + /usr/sbin/klogd $KLOGD_OPTIONS + fi fi } diff --git a/source/a/sysklogd/sysklogd.SlackBuild b/source/a/sysklogd/sysklogd.SlackBuild index 8ff3de9d..b4b83f86 100755 --- a/source/a/sysklogd/sysklogd.SlackBuild +++ b/source/a/sysklogd/sysklogd.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2013 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005-2016 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,12 +21,12 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=1.5 +VERSION=1.5.1 BUILD=${BUILD:-2} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; *) export ARCH=$( uname -m ) ;; esac @@ -54,6 +54,9 @@ find . \ # Use memmove() instead of strcpy() in syslogd.c zcat $CWD/use_memmove_not_strcpy.diff.gz | patch -p1 --verbose || exit 1 +# Allow -c option to log all (even repeated) messages: +zcat $CWD/sysklogd.allow.repeated.messages.diff.gz | patch -p1 --verbose || exit 1 + make all syslog_tst $NUMJOBS || make || exit 1 mkdir -p $PKG/usr/sbin diff --git a/source/a/sysklogd/sysklogd.allow.repeated.messages.diff b/source/a/sysklogd/sysklogd.allow.repeated.messages.diff new file mode 100644 index 00000000..41e6bf15 --- /dev/null +++ b/source/a/sysklogd/sysklogd.allow.repeated.messages.diff @@ -0,0 +1,69 @@ +--- ./syslogd.c.orig 2014-10-04 14:47:18.000000000 -0500 ++++ ./syslogd.c 2016-06-29 01:46:39.355541929 -0500 +@@ -776,6 +776,7 @@ + }; + + int Debug; /* debug flag */ ++int Compress = 1; /* compress repeated messages flag */ + char LocalHostName[MAXHOSTNAMELEN+1]; /* our hostname */ + char *LocalDomain; /* our local domain name */ + char *emptystring = ""; +@@ -888,7 +889,7 @@ + funix[i] = -1; + } + +- while ((ch = getopt(argc, argv, "a:dhf:l:m:np:rs:v")) != EOF) ++ while ((ch = getopt(argc, argv, "a:cdhf:l:m:np:rs:v")) != EOF) + switch((char)ch) { + case 'a': + if (nfunix < MAXFUNIX) +@@ -896,6 +897,9 @@ + else + fprintf(stderr, "Out of descriptors, ignoring %s\n", optarg); + break; ++ case 'c': /* don't compress repeated messages */ ++ Compress = 0; ++ break; + case 'd': /* debug */ + Debug = 1; + break; +@@ -1240,7 +1244,7 @@ + + int usage() + { +- fprintf(stderr, "usage: syslogd [-drvh] [-l hostlist] [-m markinterval] [-n] [-p path]\n" \ ++ fprintf(stderr, "usage: syslogd [-cdrvh] [-l hostlist] [-m markinterval] [-n] [-p path]\n" \ + " [-s domainlist] [-f conffile]\n"); + exit(1); + } +@@ -1703,7 +1707,7 @@ + /* + * suppress duplicate lines to this file + */ +- if ((flags & MARK) == 0 && msglen == f->f_prevlen && ++ if (Compress && (flags & MARK) == 0 && msglen == f->f_prevlen && + !strcmp(msg, f->f_prevline) && + !strcmp(from, f->f_prevhost)) { + (void) strncpy(f->f_lasttime, timestamp, 15); +--- ./sysklogd.8.orig 2014-10-04 14:47:18.000000000 -0500 ++++ ./sysklogd.8 2016-06-29 01:59:45.311525189 -0500 +@@ -10,6 +10,7 @@ + .RB [ " \-a " + .I socket + ] ++.RB [ " \-c " ] + .RB [ " \-d " ] + .RB [ " \-f " + .I config file +@@ -83,6 +84,11 @@ + described by the people from OpenBSD at + <http://www.guides.sk/psionic/dns/>. + .TP ++.B "\-c" ++Disable the repeating line compression that normally suppresses the ++repeated lines and logs a message such as 'last message repeated 124 ++times'. With this option, all repeated lines will be logged. ++.TP + .B "\-d" + Turns on debug mode. Using this the daemon will not proceed a + .BR fork (2) |