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

Unified Diff: base/process/launch.h

Issue 197213015: [Linux] Use PR_SET_NO_NEW_PRIVS by default in base/process/launch.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add function Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/load_and_launch_browsertest.cc ('k') | base/process/launch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/launch.h
diff --git a/base/process/launch.h b/base/process/launch.h
index d725e05eced8606dafbc3e7134814684e195912b..9e39fba6297d92bfcaae23dd89b439c187e99156 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_
« no previous file with comments | « apps/load_and_launch_browsertest.cc ('k') | base/process/launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698