| Summary: | /etc/security errors if no old compressed files | ||
|---|---|---|---|
| Product: | Base System | Reporter: | sjr <sjr> |
| Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.1-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
sjr
2000-08-13 16:10:01 UTC
> >Number: 20575 > >Category: misc > >Synopsis: /etc/security errors if no old compressed files Perhaps zcat needs a -s option (as cat(1) has). -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! On Sun, 13 Aug 2000 16:30:05 MST, Brian Somers wrote:
> > >Number: 20575
> > >Category: misc
> > >Synopsis: /etc/security errors if no old compressed files
>
> Perhaps zcat needs a -s option (as cat(1) has).
Perhaps, but you could get around this problem quite easily with the
following patch.
Ciao,
Sheldon.
Index: security
===================================================================
RCS file: /home/ncvs/src/etc/security,v
retrieving revision 1.41
diff -u -d -r1.41 security
--- security 2000/08/07 09:08:35 1.41
+++ security 2000/08/14 10:05:05
@@ -136,16 +136,22 @@
fi
fi
+msgfiles="`ls $LOG/messages.0* $LOG/messages 2>/dev/null`"
+
# Show login failures
#
separator
echo "${host} login failures:"
-zcat -f $LOG/messages.0* $LOG/messages | grep -i "^$yesterday.*login failure"
+if [ -n "${msgfiles}" ]; then
+ zcat -f ${msgfiles} | grep -i "^$yesterday.*login failure"
+fi
# Show tcp_wrapper warning messages
#
separator
echo "${host} refused connections:"
-zcat -f $LOG/messages.0* $LOG/messages | grep -i "^$yesterday.*refused connect"
+if [ -n "${msgfiles}" ]; then
+ zcat -f ${msgfiles} | grep -i "^$yesterday.*refused connect"
+fi
rm -f ${TMP}
State Changed From-To: open->closed This was fixed with the latest version of /etc/security in -stable and -current |