mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Added check to see if HD44780 is enabled and disable setuid() if it is
This commit is contained in:
@@ -157,7 +157,7 @@ int CMMDVMHost::run()
|
|||||||
::close(STDIN_FILENO);
|
::close(STDIN_FILENO);
|
||||||
::close(STDOUT_FILENO);
|
::close(STDOUT_FILENO);
|
||||||
::close(STDERR_FILENO);
|
::close(STDERR_FILENO);
|
||||||
|
#if !defined(HD44780)
|
||||||
//If we are currently root...
|
//If we are currently root...
|
||||||
if (getuid() == 0) {
|
if (getuid() == 0) {
|
||||||
//get UID for mmdvm user
|
//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
|
#endif
|
||||||
|
|
||||||
LogInfo(HEADER1);
|
LogInfo(HEADER1);
|
||||||
|
|||||||
Reference in New Issue
Block a user