Date: Wed, 20 Jun 2001 16:23:21 -0500 (CDT) From: Tim Zingelman <zingelman@fnal.gov> To: <freebsd-security@FreeBSD.ORG> Subject: grep in /etc/security Message-ID: <Pine.GSO.4.30.0106201614480.12002-100000@nova.fnal.gov>
index | next in thread | raw e-mail
On several of our 4.3-RELEASE machines, we have been getting the following
in the security check output:
x.y.z login failures:
Binary file (standard input) matches
I tracked this down to the output from this:
catmsgs() {
find $LOG -name 'messages.*' -mtime -2 |
sort -t. -r -n +1 -2 |
xargs zcat -f
[ -f $LOG/messages ] && cat $LOG/messages
}
inside /etc/security, sometimes having embedded nulls.
so later this:
n=$(catmsgs | grep -i "^$yesterday.*login failure" | tee /dev/stderr | wc -l)
returns "Binary file (standard input) matches" instead of the matches.
Adding -a to the grep, returns the expected matches.
Has anyone else seen this? Should I submit a PR, or is there a good
reason not to use 'grep -ai' here?
- Tim <Zingelman@fnal.gov>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.30.0106201614480.12002-100000>
