#-----------------------------------------------------------------------------
#
# Check /usr/lib/desktop/permissions for SUID/SGID bits
#

$file       = '/usr/lib/desktop/permissions';
$md5{$file} = '1167df839be4f40bc760c0a829a6ba5d';

&pcheck($file);
if ((-u $file || -g _) && (&getmd5($file) ne $md5{$file})) {
  &report("DANGER: SUID/SGID /usr/lib/desktop/permissions\n",
          "  Information on this vulnerability can be found at:\n",
          "  ftp://ftp.cert.org/pub/cert_bulletins/VB-95:02.sgi\n",
          "  To fix: \"chmod -s $file\" or\n",
          "          Get patch 373 from the TAC and install it.\n\n");
  &failed;
  }
else {
  &report("INFO:  No /usr/lib/desktop/permissions vulnerability\n",
          "       was found.\n");
  &passed;
  }

exit 0;
