FreeBSD Bugzilla – Attachment 185986 Details for
Bug 221925
security/logcheck: Fix bugs of logcheck-test and its man page.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
updated patch file
security_logcheck.patch (text/plain), 6.50 KB, created by
Yasuhiro Kimura
on 2017-09-02 12:23:13 UTC
(
hide
)
Description:
updated patch file
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2017-09-02 12:23:13 UTC
Size:
6.50 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 449050) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= logcheck > PORTVERSION= 1.3.18 >+PORTREVISION= 1 > CATEGORIES= security > MASTER_SITES= DEBIAN_POOL > DISTNAME= ${PORTNAME}_${PORTVERSION} >Index: files/patch-docs_logcheck-test.1 >=================================================================== >--- files/patch-docs_logcheck-test.1 (revision 449050) >+++ files/patch-docs_logcheck-test.1 (working copy) >@@ -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 >Index: files/patch-src_logcheck-test >=================================================================== >--- files/patch-src_logcheck-test (revision 449050) >+++ files/patch-src_logcheck-test (working copy) >@@ -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" >Index: files/pkg-deinstall.in >=================================================================== >--- files/pkg-deinstall.in (revision 449050) >+++ files/pkg-deinstall.in (working copy) >@@ -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 >Index: files/pkg-install.in >=================================================================== >--- files/pkg-install.in (revision 449050) >+++ files/pkg-install.in (working copy) >@@ -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 @@ > 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 @@ > 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 >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 449050) >+++ pkg-plist (working copy) >@@ -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 >+@sample %%ETCDIR%%/logcheck.conf.sample >+@sample %%ETCDIR%%/logcheck.logfiles.sample > @mode > bin/logcheck-test > man/man1/logcheck-test.1.gz
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
yasu
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 221925
:
185904
| 185986