patch to keep root permision for openwrt

This commit is contained in:
Shawn Chain 2018-07-03 10:01:19 +08:00
parent 34ceb912c9
commit 0ee26a5a98

View file

@ -206,7 +206,7 @@ int CMMDVMHost::run()
::close(STDOUT_FILENO); ::close(STDOUT_FILENO);
::close(STDERR_FILENO); ::close(STDERR_FILENO);
#if !defined(HD44780) && !defined(OLED) #if !defined(HD44780) && !defined(OLED) && !defined(_OPENWRT)
// If we are currently root... // If we are currently root...
if (getuid() == 0) { if (getuid() == 0) {
struct passwd* user = ::getpwnam("mmdvm"); struct passwd* user = ::getpwnam("mmdvm");
@ -237,7 +237,7 @@ int CMMDVMHost::run()
} }
} }
#else #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
#endif #endif