Commit f48e2d91 authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

Set allow_new_privs when launching CRD host controller from the NM process.

Previously no_new_prevs mode was used when starting CRD host from NM. This
prevents sudo from working properly. r273785 fixed similar problem for the
code that launched NM binaries within chrome.

BUG=378012
R=lambroslambrou@chromium.org

Review URL: https://codereview.chromium.org/302083007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273983 0039d316-1c4b-4281-b951-d872f2087c98
parent 12da3a79
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h" #include "base/thread_task_runner_handle.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h"
#include "net/base/net_util.h" #include "net/base/net_util.h"
#include "remoting/host/host_config.h" #include "remoting/host/host_config.h"
#include "remoting/host/json_host_config.h" #include "remoting/host/json_host_config.h"
...@@ -101,6 +102,11 @@ bool RunHostScriptWithTimeout( ...@@ -101,6 +102,11 @@ bool RunHostScriptWithTimeout(
fds_to_remap.push_back(std::pair<int, int>(STDERR_FILENO, STDOUT_FILENO)); fds_to_remap.push_back(std::pair<int, int>(STDERR_FILENO, STDOUT_FILENO));
base::LaunchOptions options; base::LaunchOptions options;
options.fds_to_remap = &fds_to_remap; options.fds_to_remap = &fds_to_remap;
#if !defined(OS_CHROMEOS)
options.allow_new_privs = true;
#endif
if (!base::LaunchProcess(command_line, options, &process_handle)) { if (!base::LaunchProcess(command_line, options, &process_handle)) {
LOG(ERROR) << "Failed to run command: " LOG(ERROR) << "Failed to run command: "
<< command_line.GetCommandLineString(); << command_line.GetCommandLineString();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment