mirror of
https://github.com/g4klx/MMDVMHost
synced 2026-02-04 22:05:41 +08:00
Merge branch 'master' into pocsag
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
@@ -210,7 +212,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");
|
||||
@@ -241,7 +243,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