2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 10:46:03 +00:00

refusing define when creating a lan-ping check on a FritzBox with FHEM running under a nonroot username

git-svn-id: https://svn.fhem.de/fhem/trunk@2816 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2013-02-25 23:03:32 +00:00
parent 8403cc8560
commit 4333277cb9

View File

@ -118,7 +118,7 @@ PRESENCE_Define($$)
return $msg;
}
if($destination eq "fritzbox" and not $< == 0)
if(-X "/usr/bin/ctlmgr_ctl" and $destination eq "fritzbox" or $destination eq "lan-ping" and not $< == 0)
{
my $msg = "FHEM is not running under root (currently ".(getpwuid($<))[0].") This check can only performed with root access to the FritzBox";