#-----------------------------------------------------------------------------
#
# Check for presence of patch #5.  It corrects the bug in
# /usr/sbin/printers (it's also obsoleted by patch 65)
#

$file                 = '/usr/sbin/printers';
$md5{"$file.patch5"}  = 'b4400aad8c1778f29c30371414977a6d';
$md5{"$file.patch65"} = '117be86ea3021a42994c49c2a839734a';
$tmp                  = '/usr/sbin/sgihelp';
$md5{$tmp}            = '4305146e90a1f9d54ec877a8987fd45b';
$failed               = 0;

&pcheck($file);
if ((-e $tmp) && (&getmd5($tmp) ne $md5{$tmp})) { ## no md5 for patch65
  $failed = 1;
  }
if (
     ((-e $file) && (&getmd5($file) ne $md5{"$file.patch65"})) && ## no md5 for patch65-type /usr/sbin/printers
     ((-e _)     && (&getmd5($file) ne $md5{"$file.patch5"}))     ## no md5 for patch05-type /usr/sbin/printers
   ) {
  $failed = 1;
  }

if ($failed) {
  &report("DANGER: $file vulnerability\n",
    "  To fix: get patch 65 from the TAC.\n\n");
  &failed;
  }
else {
  &report("INFO:  The /usr/sbin/printers hole appears to have been patched.\n");
  &passed;
  }

exit 0;

