aboutsummaryrefslogblamecommitdiff
path: root/www/chromium/files/patch-remoting_host_setup_start__host__main.cc
blob: 943ffb339008266dcf26d15f4051d5c65a1a5803 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                                       
                                          
                 
                    
                               
 

                                             

                                                                  
                               
                                                                          


                                           

                                             


                                                                     
                                                              

                      
 

                                             


                                                                                
--- remoting/host/setup/start_host_main.cc.orig	2024-05-21 18:07:39 UTC
+++ remoting/host/setup/start_host_main.cc
@@ -38,7 +38,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)
@@ -340,7 +340,7 @@ bool InitializeCloudMachineParams(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);
@@ -371,7 +371,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