blob: 5a51c6e6955d4326eaada5b328c535d0122e7049 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- remoting/host/setup/start_host_main.cc.orig 2023-12-23 12:33:28 UTC
+++ remoting/host/setup/start_host_main.cc
@@ -36,7 +36,7 @@
#include <unistd.h>
#endif // BUILDFLAG(IS_POSIX)
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#include "remoting/host/setup/daemon_controller_delegate_linux.h"
#include "remoting/host/setup/start_host_as_root.h"
#endif // BUILDFLAG(IS_LINUX)
@@ -242,7 +242,7 @@ bool InitializeCorpMachineParams(HostStarter::Params&
} // namespace
int StartHostMain(int argc, char** argv) {
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
// Minimize the amount of code that runs as root on Posix systems.
if (getuid() == 0) {
return remoting::StartHostAsRoot(argc, argv);
@@ -274,7 +274,7 @@ int StartHostMain(int argc, char** argv) {
mojo::core::Init();
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
if (command_line->HasSwitch("no-start")) {
// On Linux, registering the host with systemd and starting it is the only
// reason start_host requires root. The --no-start options skips that final
|