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

Issue 10492006: Setuid sandbox API versioning (Closed)

Created:
8 years, 6 months ago by jln (very slow on Chromium)
Modified:
8 years, 6 months ago
CC:
chromium-reviews, jochen+watch-content_chromium.org, erikwright (departed), jam, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, agl, jln+watch_chromium.org
Visibility:
Public.

Description

Setuid sandbox API versioning We introduce API versioning to the setuid sandbox and issue warnings when the versions Chrome and the Sandbox expect are different. 1. The Zygote launcher in the browser will export the API version it expects to the environment. 2. The setuid sandbox will match its own version with the one in the environment. 3. Afterwards, it will export the API it provides to the environment for the sandboxed process. 4. The Zygote (the sandboxed process) will in turn check for the API number. The double check is needed because a version of the browser or of the setuid sandbox that does check for API could co-exist with a version that does not. The various utilities that are part of the setuid sandbox are not versioned because they have callers that are external to Chrome (in ChromeOS). When environment variables are not found, we assume version 0. Since the API is for now set to 0, this change will not produce any warning at the moment. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140456

Patch Set 1 #

Total comments: 6

Patch Set 2 : change environment variables names #

Patch Set 3 : Switch return value logic in CheckAndExportApiVersion #

Total comments: 1

Patch Set 4 : Indent SetSandboxAPIEnvironmentVariable #

Patch Set 5 : rebase on current state of tree #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -3 lines) Patch
M base/linux_util.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/zygote_host_impl_linux.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M content/zygote/zygote_main_linux.cc View 1 2 3 1 chunk +26 lines, -2 lines 0 comments Download
M sandbox/linux/suid/linux_util.h View 1 chunk +1 line, -0 lines 0 comments Download
M sandbox/linux/suid/sandbox.c View 1 2 4 chunks +57 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
jln (very slow on Chromium)
Setuid sandbox API versioning. I use the environment to check/set for the setuid sandbox version ...
8 years, 6 months ago (2012-06-02 02:56:12 UTC) #1
Brad Chen
I think this might be more useful if there were a test (probably a browser_test) ...
8 years, 6 months ago (2012-06-02 15:57:02 UTC) #2
jln (very slow on Chromium)
On 2012/06/02 15:57:02, Brad Chen wrote: > I think this might be more useful if ...
8 years, 6 months ago (2012-06-04 19:25:55 UTC) #3
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/10492006/diff/1/base/linux_util.h File base/linux_util.h (right): https://chromiumcodereview.appspot.com/10492006/diff/1/base/linux_util.h#newcode22 base/linux_util.h:22: static const char kSandboxEnvironmentApiRequest[] = "SBX_API_RQ"; On 2012/06/02 15:57:03, ...
8 years, 6 months ago (2012-06-04 19:26:23 UTC) #4
Jorge Lucangeli Obes
Mechanism looks sane. lgtm
8 years, 6 months ago (2012-06-04 21:09:04 UTC) #5
Markus (顧孟勤)
lgtm With the exception of confusing return codes, this looks good. But you really shouldn't ...
8 years, 6 months ago (2012-06-04 21:41:06 UTC) #6
jln (very slow on Chromium)
On 2012/06/04 21:41:06, Markus (顧孟勤) wrote: > lgtm > > With the exception of confusing ...
8 years, 6 months ago (2012-06-04 21:49:14 UTC) #7
Brad Chen
LGTM
8 years, 6 months ago (2012-06-04 22:58:48 UTC) #8
jln (very slow on Chromium)
Brett, could you please approve this for /base/linux_util.h ?
8 years, 6 months ago (2012-06-04 23:03:57 UTC) #9
brettw
base LGTM https://chromiumcodereview.appspot.com/10492006/diff/14001/content/browser/zygote_host_impl_linux.cc File content/browser/zygote_host_impl_linux.cc (right): https://chromiumcodereview.appspot.com/10492006/diff/14001/content/browser/zygote_host_impl_linux.cc#newcode44 content/browser/zygote_host_impl_linux.cc:44: scoped_ptr<base::Environment> env(base::Environment::Create()); You got 3 space indents ...
8 years, 6 months ago (2012-06-04 23:21:59 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jln@chromium.org/10492006/19001
8 years, 6 months ago (2012-06-04 23:52:55 UTC) #11
commit-bot: I haz the power
8 years, 6 months ago (2012-06-05 01:03:36 UTC) #12
Change committed as 140456

Powered by Google App Engine
This is Rietveld 408576698