mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2025-12-06 05:32:00 +01:00
patch to keep root permision for openwrt
This commit is contained in:
parent
34ceb912c9
commit
0ee26a5a98
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue