mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
patch to keep root permision for openwrt
This commit is contained in:
@@ -206,7 +206,7 @@ int CMMDVMHost::run()
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
|
||||
#if !defined(HD44780) && !defined(OLED)
|
||||
#if !defined(HD44780) && !defined(OLED) && !defined(_OPENWRT)
|
||||
// If we are currently root...
|
||||
if (getuid() == 0) {
|
||||
struct passwd* user = ::getpwnam("mmdvm");
|
||||
@@ -237,7 +237,7 @@ int CMMDVMHost::run()
|
||||
}
|
||||
}
|
||||
#else
|
||||
::fprintf(stderr, "Dropping root permissions in daemon mode is disabled with HD44780 display\n");
|
||||
::fprintf(stderr, "Dropping root permissions in daemon mode is disabled.\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user