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

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2816 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch
2013-02-25 23:03:32 +00:00
parent 8fb20cbb3c
commit cf065a8968

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";