#
# Checks the settings of the login configuration file
#

$warn  = 0;

&pcheck("Login Options");

if (-f $login) {
	if (open (LOGIN, $login)) {
		while (<LOGIN>) {
			next if (/^#/);

			if (/^MANDPASS.*NO/i) {
				&report("WARNING:  MANDPASS should be set to YES, as users should be required\n",
				"\tto have a password. ($login)\n");
				$warn = 1;
			} elsif (/PASSREQ.*NO/i) {
				&report("WARNING:  PASSREQ should be set to YES, as users should be required\n",
				"\tto have a password. ($login)\n");
				$warn = 1;
			} elsif (/^SYSLOG.*FAIL/i) {
				&report("WARNING:  SYSLOG should be set to ALL to make sure that system\n",
				"\tlogs are as complete as possible. ($login)\n");
				$warn = 1;
			}
		}
	}
}


if ($warn) {
	&warn;
} else {
	&passed;
}

exit 0;
