svn commit: r449672 - in head/security/logcheck: . files
Kurt Jaeger
pi at FreeBSD.org
Tue Sep 12 05:44:38 UTC 2017
Author: pi
Date: Tue Sep 12 05:44:36 2017
New Revision: 449672
URL: https://svnweb.freebsd.org/changeset/ports/449672
Log:
security/logcheck: fix bugs of logcheck-test and its man page
PR: 221925
Submitted by: Yasuhiro KIMURA <yasu at utahime.org> (maintainer)
Modified:
head/security/logcheck/Makefile
head/security/logcheck/files/patch-docs_logcheck-test.1
head/security/logcheck/files/patch-src_logcheck-test
head/security/logcheck/files/pkg-deinstall.in
head/security/logcheck/files/pkg-install.in
head/security/logcheck/pkg-plist
Modified: head/security/logcheck/Makefile
==============================================================================
--- head/security/logcheck/Makefile Tue Sep 12 05:21:09 2017 (r449671)
+++ head/security/logcheck/Makefile Tue Sep 12 05:44:36 2017 (r449672)
@@ -3,6 +3,7 @@
PORTNAME= logcheck
PORTVERSION= 1.3.18
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= DEBIAN_POOL
DISTNAME= ${PORTNAME}_${PORTVERSION}
Modified: head/security/logcheck/files/patch-docs_logcheck-test.1
==============================================================================
--- head/security/logcheck/files/patch-docs_logcheck-test.1 Tue Sep 12 05:21:09 2017 (r449671)
+++ head/security/logcheck/files/patch-docs_logcheck-test.1 Tue Sep 12 05:44:36 2017 (r449672)
@@ -1,5 +1,23 @@
--- docs/logcheck-test.1.orig 2017-01-25 21:08:04 UTC
+++ docs/logcheck-test.1
+@@ -4,7 +4,7 @@ logcheck-test \- test new logcheck rules
+ .SH SYNOPSIS
+ .B logcheck\-test
+ .RB [ \-q | \-i ]
+-.RB [ \-a | \-s | \-l
++.RB [ \-a | \-m | \-l
+ .IR FILE ]
+ .RB [ \-e ]
+ .RB [ \-P
+@@ -15,7 +15,7 @@ logcheck-test \- test new logcheck rules
+ .br
+ .B logcheck\-test
+ .RB [ \-q | \-i ]
+-.RB [ \-a | \-s | \-l
++.RB [ \-a | \-m | \-l
+ .IR FILE ]
+ .B \-r
+ .I RULEFILE
@@ -38,8 +38,8 @@ Show usage information
.B \-a, \-\-auth.log
Parse /var/log/auth.log for matching lines
Modified: head/security/logcheck/files/patch-src_logcheck-test
==============================================================================
--- head/security/logcheck/files/patch-src_logcheck-test Tue Sep 12 05:21:09 2017 (r449671)
+++ head/security/logcheck/files/patch-src_logcheck-test Tue Sep 12 05:44:36 2017 (r449672)
@@ -9,7 +9,7 @@
-l|--log-file LOGFILE : Parse LOGFILE
-i|--invert-match : Show lines that don't match the RULE or RULEFILE
-q|--quiet : Suppress rule summary
-@@ -103,9 +103,9 @@ while [ -n "${1:-}" ]; do
+@@ -103,11 +103,11 @@ while [ -n "${1:-}" ]; do
warn "option -a ignored"
fi
;;
@@ -19,5 +19,17 @@
- FILE="/var/log/syslog"
+ FILE="/var/log/messages"
else
- warn "option -s ignored"
+- warn "option -s ignored"
++ warn "option -m ignored"
fi
+ ;;
+ -q|--quiet)
+@@ -169,7 +169,7 @@ while [ -n "${1:-}" ]; do
+ done
+
+ if [ -z "$FILE" ] ; then
+- err "no log file specified, please choose -a or -s or -l LOGFILE"
++ err "no log file specified, please choose -a or -m or -l LOGFILE"
+ exit 2
+ elif ! [ -r "$FILE" ] ; then
+ err "'$FILE' permission denied"
Modified: head/security/logcheck/files/pkg-deinstall.in
==============================================================================
--- head/security/logcheck/files/pkg-deinstall.in Tue Sep 12 05:21:09 2017 (r449671)
+++ head/security/logcheck/files/pkg-deinstall.in Tue Sep 12 05:44:36 2017 (r449672)
@@ -1,25 +1,12 @@
#!/bin/sh
user="%%LOGCHECK_USER%%"
-group="%%LOGCHECK_GROUP%%"
-configfiles="logcheck.conf logcheck.logfiles"
case $2 in
-DEINSTALL)
- for f in ${configfiles}; do
- if diff %%PREFIX%%/etc/logcheck/${f} %%PREFIX%%/etc/logcheck/${f}.sample > /dev/null; then
- echo "---> ${f} configuration file is the same as ${f}.sample"
- rm -f %%PREFIX%%/etc/logcheck/${f}
- echo "---> Deleted %%PREFIX%%/etc/logcheck/${f}"
- else
- echo "---> %%PREFIX%%/etc/logcheck/${f} differs from sample file; not deleted"
- fi
- done
-;;
POST-DEINSTALL)
if /usr/bin/crontab -u "${user}" -l > /dev/null 2>&1; then
- rm -f /var/cron/tabs/${user}
- echo "---> Removed crontab for \"${user}\"."
+ echo y | /usr/bin/crontab -u "${user}" -r
+ echo "==> Removed crontab for \"${user}\"."
fi
;;
esac
Modified: head/security/logcheck/files/pkg-install.in
==============================================================================
--- head/security/logcheck/files/pkg-install.in Tue Sep 12 05:21:09 2017 (r449671)
+++ head/security/logcheck/files/pkg-install.in Tue Sep 12 05:44:36 2017 (r449672)
@@ -1,8 +1,6 @@
#!/bin/sh
user="%%LOGCHECK_USER%%"
-group="%%LOGCHECK_GROUP%%"
-configfiles="logcheck.conf logcheck.logfiles"
case $2 in
POST-INSTALL)
@@ -10,22 +8,22 @@ POST-INSTALL)
if [ -f %%EXAMPLESDIR%%/crontab.in ] ; then
if /usr/bin/crontab -u "${user}" -l >/tmp/logchecktab$$ 2>&1 ; then
if test -s /tmp/logchecktab$$; then
- echo "---> \"${user}\" already has a crontab. Not overwriting it"
- echo "---> Please merge any changes from the standard crontab file"
- echo "---> %%EXAMPLESDIR%%/crontab.in"
+ echo "==> \"${user}\" already has a crontab. Not overwriting it"
+ echo "==> Please merge any changes from the standard crontab file"
+ echo "==> %%EXAMPLESDIR%%/crontab.in"
else
/usr/bin/crontab -u "${user}" "%%EXAMPLESDIR%%/crontab.in" || exit 1
- echo "---> Installed crontab(5) file for user \"${user}\""
+ echo "==> Installed crontab(5) file for user \"${user}\""
fi
else
if grep -q "are not allowed to use this program" /tmp/logchecktab$$ ; then
- echo "---> The logcheck user is not allowed to run crontab."
- echo "---> Please check the contents of /var/cron/allow and /var/cron/deny"
- echo "---> and grant access, if necessary."
+ echo "==> The logcheck user is not allowed to run crontab."
+ echo "==> Please check the contents of /var/cron/allow and /var/cron/deny"
+ echo "==> and grant access, if necessary."
exit 1
else
/usr/bin/crontab -u "${user}" "%%EXAMPLESDIR%%/crontab.in" || exit 1
- echo "---> Created crontab(5) file for user \"${user}\""
+ echo "==> Created crontab(5) file for user \"${user}\""
fi
fi
rm -f /tmp/logchecktab$$
@@ -33,17 +31,9 @@ POST-INSTALL)
else
echo "---> Crontab file was not installed for user \"${user}\""
if [ -f %%EXAMPLESDIR%%/crontab.in ]; then
- echo "---> A sample crontab file can be found in %%EXAMPLESDIR%%/crontab.in"
- echo "---> for manual installation."
+ echo "==> A sample crontab file can be found in %%EXAMPLESDIR%%/crontab.in"
+ echo "==> for manual installation."
fi
fi
-
- for f in ${configfiles}; do
- if [ ! -e %%PREFIX%%/etc/logcheck/${f} ]; then
- echo "---> It seems you have no previous version of %%PREFIX%%/etc/logcheck/${f}"
- cp %%PREFIX%%/etc/logcheck/${f}.sample %%PREFIX%%/etc/logcheck/${f}
- echo "---> Created one from ${f}.sample"
- fi
- done
;;
esac
Modified: head/security/logcheck/pkg-plist
==============================================================================
--- head/security/logcheck/pkg-plist Tue Sep 12 05:21:09 2017 (r449671)
+++ head/security/logcheck/pkg-plist Tue Sep 12 05:44:36 2017 (r449672)
@@ -184,8 +184,6 @@
%%ETCDIR%%/ignore.d.workstation/wpasupplicant
%%ETCDIR%%/ignore.d.workstation/xdm
%%ETCDIR%%/ignore.d.workstation/xlockmore
-%%ETCDIR%%/logcheck.conf.sample
-%%ETCDIR%%/logcheck.logfiles.sample
%%ETCDIR%%/violations.d/kernel
%%ETCDIR%%/violations.d/logcheck
%%ETCDIR%%/violations.d/smartd
@@ -193,6 +191,8 @@
%%ETCDIR%%/violations.d/sudo
%%ETCDIR%%/violations.ignore.d/logcheck-su
%%ETCDIR%%/violations.ignore.d/logcheck-sudo
+ at sample %%ETCDIR%%/logcheck.conf.sample
+ at sample %%ETCDIR%%/logcheck.logfiles.sample
@mode
bin/logcheck-test
man/man1/logcheck-test.1.gz
More information about the svn-ports-all
mailing list