#-----------------------------------------------------------------------------
#
# Check /usr/sbin/cdinstmgr for SUID bit in 4.0.5 (it's not in 5.2)
# only check 4.0.5[A-F]
#

$cdinstmgr{''}  = 1;
$cdinstmgr{'A'} = 1;
$cdinstmgr{'B'} = 1;
$cdinstmgr{'C'} = 1;
$cdinstmgr{'D'} = 1;
$cdinstmgr{'F'} = 1;
$file = '/usr/sbin/cdinstmgr';
&pcheck($file);
if ($cdinstmgr{$os{'minor'}} && (-u $file)) {
  &report("DANGER: SUID/SGID $file vulnerability\n",
    "  To fix: \"chmod -s $file\"\n\n");
  &failed;
  }
else {
  &report("INFO:  No cdinstmgr danger detected.\n");
  &passed;
  }

exit 0;

