diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 20:30:07 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 20:30:07 +0000 |
commit | 73fa6399bd9198863d7d9e01db6fcc8cdfcc8837 (patch) | |
tree | 8c063856023e5240d9325ac184cb1213a6213056 /chrome/common/sandbox_methods_linux.h | |
parent | 97524b48d1ad4b31f5e57f7fbd53b0843b4dfd9d (diff) | |
download | chromium_src-73fa6399bd9198863d7d9e01db6fcc8cdfcc8837.zip chromium_src-73fa6399bd9198863d7d9e01db6fcc8cdfcc8837.tar.gz chromium_src-73fa6399bd9198863d7d9e01db6fcc8cdfcc8837.tar.bz2 |
Linux sandbox: plumb timezone calls through the sandbox
The localtime (and localtime_r) functions try to access /etc/localtime
in the filesystem. For sandboxed renderers, this fails, the the
functions default to a UTC timezone.
These functions are called from within WebCore and V8 and there's no
clean way to patch the source code in place to do a hairpin turn and
manage an IPC. Additionally, we cannot overwrite the calls with the
usual symbol resolution procedures since the same chrome binary must
serve as both the unsandboxed browser and sandboxed renderer.
Thus we patch the GOT at runtime if we find, in the zygote process,
that we are sandboxed.
BUG=16800
TEST=Run javascript:alert(new Date().getTimezoneOffset()) in a sandboxed renderer. The resulting timezone offset (in minutes) should be correct for the local timezone.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/sandbox_methods_linux.h')
-rw-r--r-- | chrome/common/sandbox_methods_linux.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/common/sandbox_methods_linux.h b/chrome/common/sandbox_methods_linux.h index cfa2c84..4dceba0 100644 --- a/chrome/common/sandbox_methods_linux.h +++ b/chrome/common/sandbox_methods_linux.h @@ -13,6 +13,7 @@ class LinuxSandbox { public: enum Methods { METHOD_GET_FONT_FAMILY_FOR_CHARS = 32, + METHOD_LOCALTIME = 33, }; }; |