mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 16:56:04 +00:00
Changing to the dialout group added
git-svn-id: https://svn.fhem.de/fhem/trunk@1015 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4e82638823
commit
bcdc13b5ca
@ -167,7 +167,7 @@ my $nextat; # Time when next timer will be triggered.
|
||||
my $intAtCnt=0;
|
||||
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
||||
my $duplidx=0; # helper for the above pool
|
||||
my $cvsid = '$Id: fhem.pl,v 1.151 2011-09-12 15:22:06 rudolfkoenig Exp $';
|
||||
my $cvsid = '$Id: fhem.pl,v 1.152 2011-09-23 11:52:00 rudolfkoenig Exp $';
|
||||
my $namedef =
|
||||
"where <name> is either:\n" .
|
||||
"- a single device name\n" .
|
||||
@ -251,6 +251,13 @@ if(int(@ARGV) != 1 && int(@ARGV) != 2) {
|
||||
|
||||
# If started as root, and there is a fhem user in the /etc/passwd, su to it
|
||||
if($^O !~ m/Win/ && $< == 0) {
|
||||
|
||||
my @gr = getgrnam("dialout");
|
||||
if(@gr) {
|
||||
use POSIX qw(setgid);
|
||||
setgid($gr[2]);
|
||||
}
|
||||
|
||||
my @pw = getpwnam("fhem");
|
||||
if(@pw) {
|
||||
use POSIX qw(setuid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user