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

Unified Diff: content/common/sandbox_linux/sandbox_linux.cc

Issue 189113009: Linux sandbox: open /proc with O_CLOEXEC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_linux/sandbox_linux.cc
diff --git a/content/common/sandbox_linux/sandbox_linux.cc b/content/common/sandbox_linux/sandbox_linux.cc
index 1cc21c340f61919073d4ed718b0654af0d9ccfbf..7a048994667e110876a52bf4c449cdd89d326718 100644
--- a/content/common/sandbox_linux/sandbox_linux.cc
+++ b/content/common/sandbox_linux/sandbox_linux.cc
@@ -140,7 +140,7 @@ void LinuxSandbox::PreinitializeSandbox() {
#if !defined(NDEBUG)
// Open proc_fd_ only in Debug mode so that forgetting to close it doesn't
// produce a sandbox escape in Release mode.
- proc_fd_ = open("/proc", O_DIRECTORY | O_RDONLY);
+ proc_fd_ = open("/proc", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
CHECK_GE(proc_fd_, 0);
#endif // !defined(NDEBUG)
// We "pre-warm" the code that detects supports for seccomp BPF.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698