2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-14 15:39:12 +00:00

SecurityCheck fixes

git-svn-id: https://svn.fhem.de/fhem/trunk@1661 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-06-28 16:48:15 +00:00
parent 9eff6e36ee
commit 0a5e369b19
3 changed files with 9 additions and 4 deletions

View File

@ -37,7 +37,7 @@ telnet_SecurityCheck($$)
AttrVal($_, "globalpassword", undef)) }
devspec2array("TYPE=telnet");
$motd .= (join(",", sort @list).
" has no password/globalpassword attribute\n")
" has no password/globalpassword attribute.\n")
if(@list);
$attr{global}{motd} = $motd;
}

View File

@ -369,15 +369,20 @@ $attr{global}{motd} = "$sc_text\n\n"
$init_done = 1;
DoTrigger("global", "INITIALIZED");
$attr{global}{motd} .= "Running with root privileges."
if($^O !~ m/Win/ && $< == 0);
$attr{global}{motd} .=
"\nRestart fhem for a new check if the problem ist fixed,\n".
"\nRestart fhem for a new check if the problem is fixed,\n".
"or set the global attribute motd to none to supress this message.\n"
if($attr{global}{motd} =~ m/^$sc_text\n\n./);
my $motd = $attr{global}{motd};
if($motd eq "$sc_text\n\n") {
delete($attr{global}{motd});
} else {
Log 2, $motd if($motd ne "none");
if($motd ne "none") {
$motd =~ s/\n/ /g;
Log 2, $motd;
}
}
Log 0, "Server started (version $attr{global}{version}, pid $$)";

View File

@ -121,7 +121,7 @@ FW_SecurityCheck($$)
if($motd =~ "^SecurityCheck") {
my @list = grep { !AttrVal($_, "basicAuth", undef) }
devspec2array("TYPE=FHEMWEB");
$motd .= (join(",", sort @list)." has no basicAuth attribute\n")
$motd .= (join(",", sort @list)." has no basicAuth attribute.\n")
if(@list);
$attr{global}{motd} = $motd;
}