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

Unified Diff: content/renderer/renderer_main_platform_delegate_linux.cc

Issue 285283003: Remove flag --test-sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed directory, gyp and isolate refs Created 6 years, 7 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
Index: content/renderer/renderer_main_platform_delegate_linux.cc
diff --git a/content/renderer/renderer_main_platform_delegate_linux.cc b/content/renderer/renderer_main_platform_delegate_linux.cc
index bc9deec23a811a3dc69091fc6390cb473b202271..637aec233d19e3b7c3b9a548c984137766f5bee1 100644
--- a/content/renderer/renderer_main_platform_delegate_linux.cc
+++ b/content/renderer/renderer_main_platform_delegate_linux.cc
@@ -39,12 +39,6 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
void RendererMainPlatformDelegate::PlatformUninitialize() {
}
-bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
- // The sandbox is started in the zygote process: zygote_main_linux.cc
- // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
- return true;
-}
-
bool RendererMainPlatformDelegate::EnableSandbox() {
// The setuid sandbox is started in the zygote process: zygote_main_linux.cc
// http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
@@ -54,41 +48,4 @@ bool RendererMainPlatformDelegate::EnableSandbox() {
return true;
}
-void RendererMainPlatformDelegate::RunSandboxTests(bool no_sandbox) {
jln (very slow on Chromium) 2014/05/20 02:29:11 I really would like to keep this sanity check that
luken 2014/05/28 19:19:39 Done.
- // The LinuxSandbox class requires going through initialization before
- // GetStatus() and others can be used. When we are not launched through the
- // Zygote, this initialization will only happen in the renderer process if
- // EnableSandbox() above is called, which it won't necesserily be.
- // This only happens with flags such as --renderer-cmd-prefix which are
- // for debugging.
- if (no_sandbox)
- return;
-
- // about:sandbox uses a value returned from LinuxSandbox::GetStatus() before
- // any renderer has been started.
- // Here, we test that the status of SeccompBpf in the renderer is consistent
- // with what LinuxSandbox::GetStatus() said we would do.
- class LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance();
- if (linux_sandbox->GetStatus() & kSandboxLinuxSeccompBPF) {
- CHECK(linux_sandbox->seccomp_bpf_started());
- }
-
- // Under the setuid sandbox, we should not be able to open any file via the
- // filesystem.
- if (linux_sandbox->GetStatus() & kSandboxLinuxSUID) {
- CHECK(!base::PathExists(base::FilePath("/proc/cpuinfo")));
- }
-
-#if defined(__x86_64__)
- // Limit this test to architectures where seccomp BPF is active in renderers.
- if (linux_sandbox->seccomp_bpf_started()) {
- errno = 0;
- // This should normally return EBADF since the first argument is bogus,
- // but we know that under the seccomp-bpf sandbox, this should return EPERM.
- CHECK_EQ(fchmod(-1, 07777), -1);
- CHECK_EQ(errno, EPERM);
- }
-#endif // __x86_64__
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698