From 8f9971fbc39a6858a020e9648e04cc8d3852e56d Mon Sep 17 00:00:00 2001 From: markusbloch Date: Mon, 25 Feb 2013 23:03:32 +0000 Subject: [PATCH] refusing define when creating a lan-ping check on a FritzBox with FHEM running under a nonroot username git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2816 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_PRESENCE.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 81500a7dc..3ce696250 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -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";