3 # $FreeBSD: src/etc/periodic/daily/470.status-named,v 1.1.2.2 2001/07/28 11:44:22 brian Exp $
6 # If there is a global system configuration file, suck it in.
8 if [ -r /etc/defaults/periodic.conf ]
10 . /etc/defaults/periodic.conf
15 find /var/log -name 'messages.*' -mtime -2 |
16 sort -t. -r -n +1 -2 |
18 [ -f /var/log/messages ] && cat /var/log/messages
21 case "$daily_status_named_enable" in
24 echo 'Checking for denied zone transfers (AXFR and IXFR):'
26 start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
28 perl -ne 'print "$2 from $1\n"
29 if (/^'"$start"'.*named\[\d+\]: denied [AI]XFR from \[(.*)\]\.\d+ for "(.*)"/);' |
35 if (/^.*from (.*)$/) {
38 if ($ARGV[0] =~ /^yes$/i) {
39 ($host) = gethostbyaddr(inet_aton($ip_addr), AF_INET);
51 ' $daily_status_named_usedns | tee /dev/stderr | wc -l)