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.dec < prev    next >
Text File  |  1992-03-10  |  1KB  |  54 lines

  1. #!/bin/sh
  2. #
  3. #  DEC 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. BUG="$AWK -f ./bug_cmp"
  13.  
  14. if $TEST ! -f ./bug_cmp ; then
  15.     $ECHO "Must have bug compare module, ./bug_cmp, to run..."
  16.     exit 2
  17.     fi
  18. # what is the date?  We just need the month and year...
  19. # Format: Fri Feb  7 14:16:55 PST 1992
  20. if $TEST $# -eq "2" ; then
  21.         real_date="$1 $2"
  22. else
  23.         real_date=`$DATE | $AWK '{print $2, $NF}'`
  24.         fi
  25.  
  26. # chroot
  27. #
  28. #   I think you could add a check to see if this was suid root, but
  29. # I can't remember...
  30. #
  31. # Ultrix 4.0 and 4.1
  32. chroot="/usr/bin/chroot"
  33. fix_date="1 May 1991"
  34. cert_advis="CA-91:05"
  35.  
  36. if $TEST -f "$chroot" ; then
  37.     cur_date=`$LS $LS_OPTS $chroot | $AWK '{print $8, $7, $9}'`
  38.     $ECHO $chroot $fix_date $cur_date $cert_advis $real_date | $BUG
  39.     fi
  40.  
  41. # /usr/bin/mail
  42. #
  43. # Fixed in 4.2
  44. mail="/usr/bin/mail"
  45. fix_date="23 Aug 1991"
  46. cert_advis="CA-91:13"
  47.  
  48. if $TEST -f "$mail" ; then
  49.     cur_date=`$LS $LS_OPTS $mail | $AWK '{print $8, $7, $9}'`
  50.     $ECHO $mail $fix_date $cur_date $cert_advis $real_date | $BUG
  51.     fi
  52.  
  53. # finis
  54.