-
Notifications
You must be signed in to change notification settings - Fork 1
/
bug.chk.aix
executable file
·64 lines (59 loc) · 1.61 KB
/
bug.chk.aix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
:
#
# IBM/AIX module for bug/vulnerability checking
#
ECHO=/bin/echo
TEST=/bin/test
LS=/bin/ls
LS_OPTS2="g"
LS_OPTS="-slaL$LS_OPTS2"
ARCH=/bin/arch
GREP=/bin/grep
AWK=/bin/awk
DATE=/bin/date
BUG="$AWK -f ./bug_cmp"
if $TEST ! -f ./bug_cmp ; then
$ECHO "Must have bug compare module, ./bug_cmp, to run..."
exit 2
fi
# what is the date? We just need the month and year...
# Format: Fri Feb 7 14:16:55 PST 1992
real_date=`$DATE | $AWK '{print $2, $NF}'`
THIS_YEAR=`$DATE | $AWK '{print $NF}'`
# tftpd
#
#
# Fixed in version "1.13.1.3" (do a "what /etc/tftpd")
tftpd="/etc/tftpd"
fix_date="17 Oct 1991"
cert_advis="CA-91:19"
# IBM says to do this (`what`); I'm going to go by date, because if I search
# for a specific version, I'll be screwed when they change it.
# `what /etc/tftpd`
if $TEST -f "$tftpd" ; then
cur_date=`$LS $LS_OPTS $tftpd | $AWK '{if (index($9, ":")) print $8,$7, '"$THIS_YEAR"' ; else print $8,$7,$9}'`
$ECHO $tftpd $fix_date $cur_date $cert_advis $real_date | $BUG
fi
# /usr/etc/rpc.rexd
#
#
rexd="/usr/etc/rcp.rexd"
fix_date="5 Mar 1992"
cert_advis="CA-92:5"
#
if $TEST -f "$rexd" ; then
cur_date=`$LS $LS_OPTS $rexd | $AWK '{if (index($9, ":")) print $8,$7, '"$THIS_YEAR"' ; else print $8,$7,$9}'`
$ECHO $rexd $fix_date $cur_date $cert_advis $real_date | $BUG
fi
# /bin/passwd
#
# A temp fix is to chmod 0500 /bin/passwd.
passwd="/bin/passwd"
fix_date="31 Mar 1992"
cert_advis="CA-92:7"
#
if $TEST -f "$passwd" ; then
cur_date=`$LS $LS_OPTS $passwd | $AWK '{if (index($9, ":")) print $8,$7, '"$THIS_YEAR"' ; else print $8,$7,$9}'`
$ECHO $passwd $fix_date $cur_date $cert_advis $real_date | $BUG
fi
# finis