Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: base/process/launch.cc

Issue 308073002: Clear environment variables for nacl_helper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process/launch.h" 5 #include "base/process/launch.h"
6 6
7 namespace base { 7 namespace base {
8 8
9 LaunchOptions::LaunchOptions() 9 LaunchOptions::LaunchOptions()
10 : wait(false), 10 : wait(false),
11 #if defined(OS_WIN) 11 #if defined(OS_WIN)
12 start_hidden(false), 12 start_hidden(false),
13 handles_to_inherit(NULL), 13 handles_to_inherit(NULL),
14 inherit_handles(false), 14 inherit_handles(false),
15 as_user(NULL), 15 as_user(NULL),
16 empty_desktop_name(false), 16 empty_desktop_name(false),
17 job_handle(NULL), 17 job_handle(NULL),
18 stdin_handle(NULL), 18 stdin_handle(NULL),
19 stdout_handle(NULL), 19 stdout_handle(NULL),
20 stderr_handle(NULL), 20 stderr_handle(NULL),
21 force_breakaway_from_job_(false) 21 force_breakaway_from_job_(false)
22 #else 22 #else
23 clear_environ(false),
23 fds_to_remap(NULL), 24 fds_to_remap(NULL),
24 maximize_rlimits(NULL), 25 maximize_rlimits(NULL),
25 new_process_group(false) 26 new_process_group(false)
26 #if defined(OS_LINUX) 27 #if defined(OS_LINUX)
27 , clone_flags(0) 28 , clone_flags(0)
28 , allow_new_privs(false) 29 , allow_new_privs(false)
29 #endif // OS_LINUX 30 #endif // OS_LINUX
30 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
31 , ctrl_terminal_fd(-1) 32 , ctrl_terminal_fd(-1)
32 #endif // OS_CHROMEOS 33 #endif // OS_CHROMEOS
33 #endif // !defined(OS_WIN) 34 #endif // !defined(OS_WIN)
34 { 35 {
35 } 36 }
36 37
37 LaunchOptions::~LaunchOptions() { 38 LaunchOptions::~LaunchOptions() {
38 } 39 }
39 40
40 LaunchOptions LaunchOptionsForTest() { 41 LaunchOptions LaunchOptionsForTest() {
41 LaunchOptions options; 42 LaunchOptions options;
42 #if defined(OS_LINUX) 43 #if defined(OS_LINUX)
43 // To prevent accidental privilege sharing to an untrusted child, processes 44 // To prevent accidental privilege sharing to an untrusted child, processes
44 // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this 45 // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
45 // new child will be used for testing only. 46 // new child will be used for testing only.
46 options.allow_new_privs = true; 47 options.allow_new_privs = true;
47 #endif 48 #endif
48 return options; 49 return options;
49 } 50 }
50 51
51 } // namespace base 52 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698