home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cops_104.zip / cops_104 / bug.chk.apollo < prev    next >
Text File  |  1992-03-10  |  1KB  |  51 lines

  1. #!/bin/sh
  2. #
  3. #  Apollo module for bug/vulnerability checking
  4. #
  5. ECHO=/bin/echo
  6. TEST=/bin/test
  7. LS=/bin/ls
  8. LS_OPTS="-slagL"
  9. ARCH=/bin/arch
  10. GREP=/bin/grep
  11. AWK=/bin/awk
  12. UNIQ=/usr/bin/uniq
  13. BUG="$AWK -f ./bug_cmp"
  14.  
  15. if $TEST ! -f ./bug_cmp ; then
  16.     $ECHO "Must have bug compare module, ./bug_cmp, to run..."
  17.     exit 2
  18.     fi
  19.  
  20. # try to find out OS version:
  21. if $TEST -f /com/bldt ; then
  22.     bldt=/com/bldt
  23. elif $TEST -f /usr/apollo/bin/bldt ; then
  24.     bldt=/usr/apollo/bin/bldt
  25.     fi
  26. if $TEST -f "$bldt" ; then
  27.     release_level=`$bldt | $AWK '{ for (i = 1; i <= NF; i++) 
  28.         if ($i == "revision") print $(i+1) }' | $UNIQ`
  29.     fi
  30.  
  31. # what is the date?  We just need the month and year...
  32. # Format: Fri Feb  7 14:16:55 PST 1992
  33. if $TEST $# -eq "2" ; then
  34.         real_date="$1 $2"
  35. else
  36.         real_date=`$DATE | $AWK '{print $2, $NF}'`
  37.         fi
  38.  
  39. # crp
  40. #
  41. # Was this ever officially fixed?
  42. crp="/usr/apollo/bin/crp"
  43. fix_date="18 Dec 1991"
  44. cert_advis="CA-91:23"
  45. if $TEST -f "$crp" ; then
  46.     cur_date=`$LS $LS_OPTS $crp | $AWK '{print $8, $7, $9}'`
  47.     $ECHO $crp $fix_date $cur_date $cert_advis $real_date | $BUG
  48.     fi
  49.  
  50. # finis
  51.