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

Issue 849893004: Move a couple of utility functions to a new namespace_utils class. (Closed)

Created:
5 years, 11 months ago by rickyz (no longer on Chrome)
Modified:
5 years, 11 months ago
CC:
chromium-reviews, jln+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move a couple of utility functions to a new namespace_utils class. The implementations are minorly different - uses /proc/self/ns/* files to detect namespaces support, and always make sure to write uid_map in a single write. BUG=312380 Committed: https://crrev.com/41fb1457a6a221b5417608154bbdc7d433520f0d Cr-Commit-Position: refs/heads/master@{#313221}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add DISALLOW_IMPLICIT_CONSTRUCTORS. #

Total comments: 6

Patch Set 3 : Rename to SupportsUnprivilegedNamespace, which always checks for user namespace support #

Total comments: 14

Patch Set 4 : Respond to comments #

Total comments: 20

Patch Set 5 : Respond to comments, fix broken test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -42 lines) Patch
M sandbox/linux/BUILD.gn View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M sandbox/linux/sandbox_linux.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M sandbox/linux/sandbox_linux_test_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M sandbox/linux/services/credentials.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M sandbox/linux/services/credentials.cc View 1 2 3 4 4 chunks +4 lines, -36 lines 0 comments Download
M sandbox/linux/services/credentials_unittest.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A sandbox/linux/services/namespace_utils.h View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
A sandbox/linux/services/namespace_utils.cc View 1 2 3 4 1 chunk +90 lines, -0 lines 0 comments Download
A sandbox/linux/services/namespace_utils_unittest.cc View 1 2 3 4 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
rickyz (no longer on Chrome)
5 years, 11 months ago (2015-01-14 00:12:00 UTC) #2
jln (very slow on Chromium)
A few early comments. https://codereview.chromium.org/849893004/diff/1/sandbox/linux/services/namespace_utils.h File sandbox/linux/services/namespace_utils.h (right): https://codereview.chromium.org/849893004/diff/1/sandbox/linux/services/namespace_utils.h#newcode1 sandbox/linux/services/namespace_utils.h:1: // Copyright (c) 2014 The ...
5 years, 11 months ago (2015-01-14 00:46:38 UTC) #4
rickyz (no longer on Chrome)
https://codereview.chromium.org/849893004/diff/40001/sandbox/linux/services/namespace_utils.cc File sandbox/linux/services/namespace_utils.cc (right): https://codereview.chromium.org/849893004/diff/40001/sandbox/linux/services/namespace_utils.cc#newcode47 sandbox/linux/services/namespace_utils.cc:47: bool NamespaceUtils::SupportsLinuxNamespace(int type) { On 2015/01/14 00:46:38, jln wrote: ...
5 years, 11 months ago (2015-01-23 00:23:38 UTC) #5
jln (very slow on Chromium)
https://codereview.chromium.org/849893004/diff/40001/sandbox/linux/services/namespace_utils.cc File sandbox/linux/services/namespace_utils.cc (right): https://codereview.chromium.org/849893004/diff/40001/sandbox/linux/services/namespace_utils.cc#newcode47 sandbox/linux/services/namespace_utils.cc:47: bool NamespaceUtils::SupportsLinuxNamespace(int type) { On 2015/01/23 00:23:38, rickyz wrote: ...
5 years, 11 months ago (2015-01-23 00:27:09 UTC) #6
rickyz (no longer on Chrome)
https://codereview.chromium.org/849893004/diff/1/sandbox/linux/services/namespace_utils.h File sandbox/linux/services/namespace_utils.h (right): https://codereview.chromium.org/849893004/diff/1/sandbox/linux/services/namespace_utils.h#newcode1 sandbox/linux/services/namespace_utils.h:1: // Copyright (c) 2014 The Chromium Authors. All rights ...
5 years, 11 months ago (2015-01-23 01:20:19 UTC) #8
jln (very slow on Chromium)
My high level remark is that I think you need to check for the current ...
5 years, 11 months ago (2015-01-23 02:48:24 UTC) #9
rickyz (no longer on Chrome)
https://codereview.chromium.org/849893004/diff/80001/sandbox/linux/services/credentials.cc File sandbox/linux/services/credentials.cc (right): https://codereview.chromium.org/849893004/diff/80001/sandbox/linux/services/credentials.cc#newcode50 sandbox/linux/services/credentials.cc:50: struct FILECloser { On 2015/01/23 02:48:23, jln wrote: > ...
5 years, 11 months ago (2015-01-23 23:59:37 UTC) #10
jln (very slow on Chromium)
Almost there! The testing framework is a little crazy. sandbox/linux/ has its own stuff (so ...
5 years, 11 months ago (2015-01-27 00:06:45 UTC) #11
rickyz (no longer on Chrome)
https://codereview.chromium.org/849893004/diff/100001/sandbox/linux/services/namespace_utils.cc File sandbox/linux/services/namespace_utils.cc (right): https://codereview.chromium.org/849893004/diff/100001/sandbox/linux/services/namespace_utils.cc#newcode1 sandbox/linux/services/namespace_utils.cc:1: // Copyright 2014 The Chromium Authors. All rights reserved. ...
5 years, 11 months ago (2015-01-27 01:08:04 UTC) #12
jln (very slow on Chromium)
lgtm (Note: try to make your rebases a separate patchset to facilitate reviews).
5 years, 11 months ago (2015-01-27 02:17:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/849893004/120001
5 years, 11 months ago (2015-01-27 02:18:46 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:120001)
5 years, 11 months ago (2015-01-27 03:58:27 UTC) #16
commit-bot: I haz the power
5 years, 11 months ago (2015-01-27 03:59:12 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/41fb1457a6a221b5417608154bbdc7d433520f0d
Cr-Commit-Position: refs/heads/master@{#313221}

Powered by Google App Engine
This is Rietveld 408576698