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

Issue 155783: Linux sandbox: plumb timezone calls through the sandbox (Closed)

Created:
11 years, 5 months ago by agl
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : ... #

Patch Set 3 : ... #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -1 line) Patch
M chrome/browser/renderer_host/render_sandbox_host_linux.cc View 3 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/zygote_main_linux.cc View 1 2 4 chunks +87 lines, -1 line 1 comment Download
M chrome/common/sandbox_methods_linux.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
agl
11 years, 5 months ago (2009-07-20 17:58:44 UTC) #1
Evan Martin
+ some gents who understand guts
11 years, 5 months ago (2009-07-20 18:51:17 UTC) #2
Evan Martin
11 years, 5 months ago (2009-07-20 18:52:36 UTC) #3
Evan Martin
What I had said to agl: isn't there some way to hook functions at the ...
11 years, 5 months ago (2009-07-20 18:57:25 UTC) #4
Evan Martin
Also, this hooks glibc in some other way, who knows how crazy it is. http://bazaar.launchpad.net/~mozillateam/xulrunner/xulrunner-1.9.2.head/annotate/head:/debian/patches/bz493541_att386469_fix_flash_fullscreen_crash.patch
11 years, 5 months ago (2009-07-20 19:02:00 UTC) #5
Dean McNamee
11 years, 5 months ago (2009-07-21 09:39:21 UTC) #6
Can we cache the results to avoid IPCs?  Do we know how often the timezone is
requested?  I would opt for performance over supporting timezone changes without
restart, but maybe the performance isn't so bad.

Powered by Google App Engine
This is Rietveld 408576698