#-----------------------------------------------------------------------------
#
# Check for presence of the eoe2.sw.bsdlpr software, and if it's there,
# check the md5 of lpr
#

$md5{'lpr'}          = '641f6ca953c8163d9085f99114df5289';
$md5{'lpr.stripped'} = '7e50d43be6f8c35c8297100638460937';
$file = '/usr/bsd/lpr';

&pcheck($file);
if ($versions{'eoe2.sw.bsdlpr'}) {

  $tmp = &getmd5($file);
  if ( ($tmp ne $md5{"lpr"}) && ($tmp ne $md5{"lpr.stripped"}) ) {
    &report("DANGER: $file vulnerability\n",
      "  To fix: Get the updated version of lpr from:\n",
      "          ftp://ftp.sgi.com/sgi/IRIX4.0/lpr/lpr.latest.Z\n\n");
    &failed;
    }
  else {
    &report("INFO:  The updated IRIX 4.0.5 lpr is installed.\n");
    &passed;
    }
  }
else {
  &report("INFO:  BSD lpr software is not installed (eoe2.sw.bsdlpr).\n");
  &passed;
  }

exit 0;
