summaryrefslogtreecommitdiffstats
path: root/base/process/launch.h
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 20:06:26 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 20:06:26 +0000
commitd078691069484236801e23f87b43d0e7f4cb3e49 (patch)
treeaf2dae2756e66b44d2997aad5d10edae6132560e /base/process/launch.h
parent857ed2300f62332c13a248e768de4883d07172a7 (diff)
downloadchromium_src-d078691069484236801e23f87b43d0e7f4cb3e49.zip
chromium_src-d078691069484236801e23f87b43d0e7f4cb3e49.tar.gz
chromium_src-d078691069484236801e23f87b43d0e7f4cb3e49.tar.bz2
[Linux] Use PR_SET_NO_NEW_PRIVS by default in base/process/launch.h.
BUG=358713 R=jln@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/197213015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262786 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process/launch.h')
-rw-r--r--base/process/launch.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/process/launch.h b/base/process/launch.h
index d725e05..9e39fba 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -111,6 +111,10 @@ struct BASE_EXPORT LaunchOptions {
#if defined(OS_LINUX)
// If non-zero, start the process using clone(), using flags as provided.
int clone_flags;
+
+ // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
+ // true, then this bit will not be set in the new child process.
+ bool allow_new_privs;
#endif // defined(OS_LINUX)
#if defined(OS_CHROMEOS)
@@ -243,6 +247,10 @@ BASE_EXPORT void RaiseProcessToHighPriority();
void RestoreDefaultExceptionHandler();
#endif // defined(OS_MACOSX)
+// Creates a LaunchOptions object suitable for launching processes in a test
+// binary. This should not be called in production/released code.
+BASE_EXPORT LaunchOptions LaunchOptionsForTest();
+
} // namespace base
#endif // BASE_PROCESS_LAUNCH_H_