#-----------------------------------------------------------------------------
#
# If yp is on in chkconfig, see if /etc/config/ypbind.options has "-ypsetme"
# in there (it does by default).  This is not a really good thing to have
#

$file = '/etc/config/ypbind.options';
&pcheck($file);
if ($chkconfig{"yp"}) {
  open(YPBINDOPTIONS, $file);
  @tmp = <YPBINDOPTIONS>;
  close(YPBINDOPTIONS);
  chop $tmp[0];
  if ($tmp[0] =~ /-ypsetme/) {
    &report("DANGER: $file vulnerability\n");
    &report("  To fix: either \"chkconfig yp off\" or edit the \"-ypsetme\"\n");
    &report("          option in $file.\n\n");
    &failed;
    }
  else {
    &report("INFO:  The '-ypsetme' option to ypbind is not being used.\n",
            "       This is good.\n");
    &passed;
    }
  }
else {
  &report("INFO:  YP (NIS) is disabled.\n");
  &passed;
  }

exit 0;
