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

Side by Side Diff: content/browser/zygote_main_linux.cc

Issue 7570002: linux: turn seccomp on by default in debug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | content/common/seccomp_sandbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/zygote_host_linux.h" 5 #include "content/browser/zygote_host_linux.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 if (g_proc_fd >= 0 && SeccompSandboxEnabled()) { 792 if (g_proc_fd >= 0 && SeccompSandboxEnabled()) {
793 if (!SupportsSeccompSandbox(g_proc_fd)) { 793 if (!SupportsSeccompSandbox(g_proc_fd)) {
794 // There are a good number of users who cannot use the seccomp sandbox 794 // There are a good number of users who cannot use the seccomp sandbox
795 // (e.g. because their distribution does not enable seccomp mode by 795 // (e.g. because their distribution does not enable seccomp mode by
796 // default). While we would prefer to deny execution in this case, it 796 // default). While we would prefer to deny execution in this case, it
797 // seems more realistic to continue in degraded mode. 797 // seems more realistic to continue in degraded mode.
798 LOG(ERROR) << "WARNING! This machine lacks support needed for the " 798 LOG(ERROR) << "WARNING! This machine lacks support needed for the "
799 "Seccomp sandbox. Running renderers with Seccomp " 799 "Seccomp sandbox. Running renderers with Seccomp "
800 "sandboxing disabled."; 800 "sandboxing disabled.";
801 } else { 801 } else {
802 LOG(WARNING) << "Enabling experimental Seccomp sandbox."; 802 // TODO(evan): switch to VLOG once we shake out all the sandbox bugs.
803 LOG(WARNING) << "Enabling experimental Seccomp sandbox; if you encounter "
804 << "any problems, please try running with "
805 << "--disable-seccomp-sandbox and file bugs.";
803 sandbox_flags |= ZygoteHost::kSandboxSeccomp; 806 sandbox_flags |= ZygoteHost::kSandboxSeccomp;
804 } 807 }
805 } 808 }
806 #endif // SECCOMP_SANDBOX 809 #endif // SECCOMP_SANDBOX
807 810
808 Zygote zygote(sandbox_flags, forkdelegate); 811 Zygote zygote(sandbox_flags, forkdelegate);
809 // This function call can return multiple times, once per fork(). 812 // This function call can return multiple times, once per fork().
810 return zygote.ProcessRequests(); 813 return zygote.ProcessRequests();
811 } 814 }
OLDNEW
« no previous file with comments | « no previous file | content/common/seccomp_sandbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698