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

Issue 885673007: Minor refactoring of setuid_sandbox_client. (Closed)

Created:
5 years, 10 months ago by hidehiko
Modified:
5 years, 10 months ago
CC:
chromium-reviews, jln+watch_chromium.org, jln (very slow on Chromium), Mark Seaborn, rickyz (no longer on Chrome), hamaji, Junichi Uekawa, mazda
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Minor refactoring of setuid_sandbox_client. This CL has some minor clean up. - In IsFileSystemAccessDenied, now we check "/" instead of "/proc/self/exe". - Remove SetuidSandboxClient::CreateInitProcessReaper. Now contents uses sandbox::CreateInitProcessReaper directly and noone uses the method. - Clean up include directives in the header. This is also the preparation of enabling Layer-one sandbox (suid sandbox) on nacl_helper_nonsfi. TEST=Ran trybots. BUG=455087 Committed: https://crrev.com/10feab647ef8b96609d087f9936eee9908b057b7 Cr-Commit-Position: refs/heads/master@{#314529}

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -13 lines) Patch
M sandbox/linux/suid/client/setuid_sandbox_client.h View 1 2 chunks +2 lines, -6 lines 0 comments Download
M sandbox/linux/suid/client/setuid_sandbox_client.cc View 1 3 chunks +1 line, -7 lines 2 comments Download

Messages

Total messages: 13 (3 generated)
hidehiko
PTAL. My main motivation is preparation of nacl_helper_nonsfi sandbox implementation, but regardless of it, this ...
5 years, 10 months ago (2015-02-04 07:39:37 UTC) #2
mdempsky
https://codereview.chromium.org/885673007/diff/1/sandbox/linux/suid/client/setuid_sandbox_client.cc File sandbox/linux/suid/client/setuid_sandbox_client.cc (right): https://codereview.chromium.org/885673007/diff/1/sandbox/linux/suid/client/setuid_sandbox_client.cc#newcode34 sandbox/linux/suid/client/setuid_sandbox_client.cc:34: base::ScopedFD self_exe(HANDLE_EINTR(open("/proc/self/exe", O_RDONLY))); Can you change this function to ...
5 years, 10 months ago (2015-02-04 07:47:41 UTC) #3
hidehiko
Thank you for quick review. PTAL (running bots, now). https://codereview.chromium.org/885673007/diff/1/sandbox/linux/suid/client/setuid_sandbox_client.cc File sandbox/linux/suid/client/setuid_sandbox_client.cc (right): https://codereview.chromium.org/885673007/diff/1/sandbox/linux/suid/client/setuid_sandbox_client.cc#newcode34 sandbox/linux/suid/client/setuid_sandbox_client.cc:34: ...
5 years, 10 months ago (2015-02-04 08:14:15 UTC) #4
mdempsky
On 2015/02/04 08:14:15, hidehiko wrote: > Thank you for quick review. PTAL (running bots, now). ...
5 years, 10 months ago (2015-02-04 08:20:19 UTC) #5
hidehiko
On 2015/02/04 08:20:19, mdempsky wrote: > On 2015/02/04 08:14:15, hidehiko wrote: > > Thank you ...
5 years, 10 months ago (2015-02-04 09:18:52 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/885673007/20001
5 years, 10 months ago (2015-02-04 09:19:36 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 10 months ago (2015-02-04 09:23:20 UTC) #9
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/10feab647ef8b96609d087f9936eee9908b057b7 Cr-Commit-Position: refs/heads/master@{#314529}
5 years, 10 months ago (2015-02-04 09:24:33 UTC) #10
jln (very slow on Chromium)
https://codereview.chromium.org/885673007/diff/20001/sandbox/linux/suid/client/setuid_sandbox_client.cc File sandbox/linux/suid/client/setuid_sandbox_client.cc (right): https://codereview.chromium.org/885673007/diff/20001/sandbox/linux/suid/client/setuid_sandbox_client.cc#newcode34 sandbox/linux/suid/client/setuid_sandbox_client.cc:34: base::ScopedFD self_exe(HANDLE_EINTR(open("/", O_RDONLY))); This seems like it could easily ...
5 years, 10 months ago (2015-02-05 00:12:52 UTC) #12
mdempsky
5 years, 10 months ago (2015-02-05 01:41:19 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/885673007/diff/20001/sandbox/linux/suid/clien...
File sandbox/linux/suid/client/setuid_sandbox_client.cc (right):

https://codereview.chromium.org/885673007/diff/20001/sandbox/linux/suid/clien...
sandbox/linux/suid/client/setuid_sandbox_client.cc:34: base::ScopedFD
self_exe(HANDLE_EINTR(open("/", O_RDONLY)));
On 2015/02/05 00:12:52, jln wrote:
> This seems like it could easily regress. What was the reason for this?

Removing base::kProcSelfExe was so this function could compile without dragging
in base/process/process_metrics_linux.cc and its transitive dependencies.

Changing from "/proc/self/exe" to "/" was my suggestion, because I think it's a
stronger test that we've actually dropped filesystem access.  Agreed that we
might in the future want to relax this and allow *some* filesystem access, but I
think it'll be easy enough to tweak this test again if/when necessary.

Powered by Google App Engine
This is Rietveld 408576698