mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-01-23 00:40:22 +01:00
Added check to see if HD44780 is enabled and disable setuid() if it is
This commit is contained in:
parent
1be436b83b
commit
3617199399
|
|
@ -157,7 +157,7 @@ int CMMDVMHost::run()
|
|||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
|
||||
#if !defined(HD44780)
|
||||
//If we are currently root...
|
||||
if (getuid() == 0) {
|
||||
//get UID for mmdvm user
|
||||
|
|
@ -191,6 +191,10 @@ int CMMDVMHost::run()
|
|||
|
||||
}
|
||||
}
|
||||
#else
|
||||
::LogMessage("Warning: dropping root permissions in daemon mode is disabled with HD44780 display");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
LogInfo(HEADER1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue