#-----------------------------------------------------------------------------
#
# Check for patch 34, and if it's there, check to see if /var/inst/patchbase
# is executable by group and others (should be chmod 700, but isn't by default)
#

$file = '/var/inst/patchbase';
if ($versions{"patchSG0000034"}) {
  &pcheck($file);
  @m = split(//, sprintf("%o", (stat($file))[2]));
  if (($m[3] > 0) || ($m[4] > 0)) {
    &report("DANGER: $m[2]$m[3]$m[4] permissions on $file vulnerability\n",
            "  To fix: \"chmod 700 $file\"\n\n");
    &failed;
    }
  else {
    &report("INFO:  /var/inst/patchbase has the correct permissions.\n");
    &passed;
    }
  undef(@mode);
  }

exit 0;

