summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/renderer_main_platform_delegate_linux.cc45
1 files changed, 3 insertions, 42 deletions
diff --git a/chrome/renderer/renderer_main_platform_delegate_linux.cc b/chrome/renderer/renderer_main_platform_delegate_linux.cc
index e997bc9..6502129 100644
--- a/chrome/renderer/renderer_main_platform_delegate_linux.cc
+++ b/chrome/renderer/renderer_main_platform_delegate_linux.cc
@@ -4,10 +4,7 @@
#include "chrome/renderer/renderer_main_platform_delegate.h"
-#include <stdlib.h>
-
#include "base/debug_util.h"
-#include "base/eintr_wrapper.h"
// This is a no op class because we do not have a sandbox on linux.
@@ -19,9 +16,6 @@ RendererMainPlatformDelegate::RendererMainPlatformDelegate(
RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
}
-extern void SkiaFontConfigUseIPCImplementation(int fd);
-extern void SkiaFontConfigUseDirectImplementation();
-
void RendererMainPlatformDelegate::PlatformInitialize() {
}
@@ -29,51 +23,18 @@ void RendererMainPlatformDelegate::PlatformUninitialize() {
}
bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
- // Our sandbox support is in the very early stages
+ // We have no sandbox.
// http://code.google.com/p/chromium/issues/detail?id=8081
return true;
}
bool RendererMainPlatformDelegate::EnableSandbox() {
- // Our sandbox support is in the very early stages
+ // We have no sandbox.
// http://code.google.com/p/chromium/issues/detail?id=8081
-
- const char* const sandbox_fd_string = getenv("SBX_D");
- if (sandbox_fd_string) {
- // The SUID sandbox sets this environment variable to a file descriptor
- // over which we can signal that we have completed our startup and can be
- // chrooted.
-
- char* endptr;
- const long fd_long = strtol(sandbox_fd_string, &endptr, 10);
- if (!*sandbox_fd_string || *endptr || fd_long < 0 || fd_long > INT_MAX)
- return false;
- const int fd = fd_long;
-
- static const char kChrootMe = 'C';
- static const char kChrootMeSuccess = 'O';
-
- if (HANDLE_EINTR(write(fd, &kChrootMe, 1)) != 1)
- return false;
-
- char reply;
- if (HANDLE_EINTR(read(fd, &reply, 1)) != 1)
- return false;
- if (reply != kChrootMeSuccess)
- return false;
- if (chdir("/") == -1)
- return false;
-
- static const int kMagicSandboxIPCDescriptor = 5;
- SkiaFontConfigUseIPCImplementation(kMagicSandboxIPCDescriptor);
- } else {
- SkiaFontConfigUseDirectImplementation();
- }
-
return true;
}
void RendererMainPlatformDelegate::RunSandboxTests() {
- // Our sandbox support is in the very early stages
+ // We have no sandbox.
// http://code.google.com/p/chromium/issues/detail?id=8081
}