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.next < prev    next >
Text File  |  1992-03-10  |  2KB  |  84 lines

  1. #!/bin/sh
  2. #
  3. #  NeXT module for bug/vulnerability checking
  4. #
  5. ECHO=/bin/echo
  6. TEST=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. word_smithing="could have a hole/bug"
  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. # what is the date?  We just need the month and year...
  20. # Format: Fri Feb  7 14:16:55 PST 1992
  21. if $TEST $# -eq "2" ; then
  22.         real_date="$1 $2"
  23. else
  24.         real_date=`$DATE | $AWK '{print $2, $NF}'`
  25.         fi
  26.  
  27. # /usr/etc/restore0.9
  28. #
  29. restore=/usr/etc/restore0.9
  30. (./is_able $restore s s | $GREP SUID )> /dev/null 2>/dev/null
  31. if $TEST $? -eq "0" ; then
  32.     $ECHO "Warning!  $restore $word_smithing!  (CA-90:06a)"
  33.     fi
  34.  
  35. # npd (printer problem)
  36. #
  37. # NeXT machines running 1.0 and 1.0a
  38. npd="/usr/lib/NextPrinter/npd"
  39. fix_date="3 Oct 1990"
  40. cert_advis="CA-90:06a"
  41. if $TEST -f "$npd" ; then
  42.     cur_date=`$LS $LS_OPTS $npd | $AWK '{print $8, $7, $9}'`
  43.     $ECHO $npd $fix_date $cur_date $cert_advis $real_date | $BUG
  44.     fi
  45.  
  46. # /NextApps/BuildDisk
  47. #
  48. # NeXT machines running 1.0 and 1.0a
  49. #
  50. # FIX -- "chmod 4700 /NextApps/BuildDisk"
  51. #
  52. build_disk="/NextApps/BuildDisk"
  53. fix_date="3 Oct 1990"
  54. cert_advis="CA-90:06a"
  55. #
  56. # Can anyone execute it?
  57. ($LS $LS_OPTS $build_disk | $GREP ...x..x..x ) > /dev/null 2>/dev/null
  58.  
  59. # if so, check date, etc...
  60. if $TEST $? -eq "0" ; then
  61.     cur_date=`$LS $LS_OPTS $build_disk | $AWK '{print $8, $7, $9}'`
  62.         $ECHO "Warning!  $build_dist $word_smithing! ($cert_advis)"
  63.         fi
  64.  
  65. # /private/etc
  66. #
  67. # NeXT machines running 2.0 and 2.1
  68. #
  69. # FIX -- chmod g-w /private/etc
  70. #
  71. private="/private/etc"
  72. fix_date="14 May 1991"
  73. cert_advis="CA-91:06"
  74. #
  75. # Can group write to it?
  76. ($LS $LS_OPTS $private | $GREP drwx..w... ) > /dev/null 2>/dev/null
  77.  
  78. # if so, check date, etc...
  79. if $TEST $? -eq "0" ; then
  80.         $ECHO "Warning!  $private $word_smithing! ($cert_advis)"
  81.     fi
  82.  
  83. # finis
  84.