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

Issue 17779002: Posix: fix named SHM mappings permissions. (Closed)

Created:
7 years, 6 months ago by jln (very slow on Chromium)
Modified:
7 years, 5 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, gavinp+memory_chromium.org
Visibility:
Public.

Description

Posix: fix named SHM mappings permissions. Make sure that named mappings in /dev/shm/ aren't created with broad permissions. BUG=254159 R=mark@chromium.org, markus@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=209814

Patch Set 1 #

Patch Set 2 : Switch to proper low level functions. #

Total comments: 4

Patch Set 3 : Check uid if opening existing file. (And rebase). #

Total comments: 33

Patch Set 4 : Address Mark's comments. #

Total comments: 4

Patch Set 5 : Address new comments. #

Total comments: 2

Patch Set 6 : Improve comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -5 lines) Patch
M base/memory/shared_memory_posix.cc View 1 2 3 4 2 chunks +40 lines, -4 lines 0 comments Download
M base/memory/shared_memory_unittest.cc View 1 2 3 4 5 3 chunks +72 lines, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
jln (very slow on Chromium)
Markus: PTAL!
7 years, 6 months ago (2013-06-26 00:24:11 UTC) #1
Markus (顧孟勤)
umask() is a per-process property and can't really be used safely from a multi-threaded application. ...
7 years, 6 months ago (2013-06-26 00:34:31 UTC) #2
jln (very slow on Chromium)
On 2013/06/26 00:34:31, Markus (顧孟勤) wrote: > umask() is a per-process property and can't really ...
7 years, 6 months ago (2013-06-26 01:40:09 UTC) #3
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/17779002/diff/5001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://chromiumcodereview.appspot.com/17779002/diff/5001/base/memory/shared_memory_posix.cc#newcode163 base/memory/shared_memory_posix.cc:163: fd = open(path.value().c_str(), O_RDWR | O_APPEND, file_mode); Do not ...
7 years, 6 months ago (2013-06-26 12:28:22 UTC) #4
jln (very slow on Chromium)
PTAL! https://codereview.chromium.org/17779002/diff/5001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/5001/base/memory/shared_memory_posix.cc#newcode163 base/memory/shared_memory_posix.cc:163: fd = open(path.value().c_str(), O_RDWR | O_APPEND, file_mode); On ...
7 years, 5 months ago (2013-07-02 02:37:05 UTC) #5
Markus (顧孟勤)
lgtm https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode171 base/memory/shared_memory_posix.cc:171: struct stat stat; Ideally, avoid using "stat" as ...
7 years, 5 months ago (2013-07-02 02:49:38 UTC) #6
jln (very slow on Chromium)
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode171 base/memory/shared_memory_posix.cc:171: struct stat stat; On 2013/07/02 02:49:38, Markus (顧孟勤) wrote: ...
7 years, 5 months ago (2013-07-02 02:51:38 UTC) #7
jln (very slow on Chromium)
Mark: could you approve this CL as base/ owner?
7 years, 5 months ago (2013-07-02 03:20:46 UTC) #8
Mark Mentovai
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode9 base/memory/shared_memory_posix.cc:9: #include <fcntl.h> Really? Again? https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode12 base/memory/shared_memory_posix.cc:12: #include <sys/stat.h> REALLY? ...
7 years, 5 months ago (2013-07-02 14:31:54 UTC) #9
jln (very slow on Chromium)
Thanks, PTAL! https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode9 base/memory/shared_memory_posix.cc:9: #include <fcntl.h> On 2013/07/02 14:31:54, Mark Mentovai ...
7 years, 5 months ago (2013-07-02 18:49:08 UTC) #10
Mark Mentovai
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode174 base/memory/shared_memory_posix.cc:174: (fstat(fd, &stat) != 0 || stat.st_uid != getuid())) { ...
7 years, 5 months ago (2013-07-02 19:52:56 UTC) #11
jln (very slow on Chromium)
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode174 base/memory/shared_memory_posix.cc:174: (fstat(fd, &stat) != 0 || stat.st_uid != getuid())) { ...
7 years, 5 months ago (2013-07-02 21:20:02 UTC) #12
Mark Mentovai
LGTM https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode174 base/memory/shared_memory_posix.cc:174: (fstat(fd, &stat) != 0 || stat.st_uid != getuid())) ...
7 years, 5 months ago (2013-07-02 21:27:59 UTC) #13
jln (very slow on Chromium)
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode174 base/memory/shared_memory_posix.cc:174: (fstat(fd, &stat) != 0 || stat.st_uid != getuid())) { ...
7 years, 5 months ago (2013-07-02 21:44:52 UTC) #14
Mark Mentovai
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode174 base/memory/shared_memory_posix.cc:174: (fstat(fd, &stat) != 0 || stat.st_uid != getuid())) { ...
7 years, 5 months ago (2013-07-02 22:05:27 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jln@chromium.org/17779002/46001
7 years, 5 months ago (2013-07-02 22:06:00 UTC) #16
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 5 months ago (2013-07-02 22:11:01 UTC) #17
jln (very slow on Chromium)
https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc File base/memory/shared_memory_posix.cc (right): https://codereview.chromium.org/17779002/diff/17001/base/memory/shared_memory_posix.cc#newcode174 base/memory/shared_memory_posix.cc:174: (fstat(fd, &stat) != 0 || stat.st_uid != getuid())) { ...
7 years, 5 months ago (2013-07-02 22:57:05 UTC) #18
jln (very slow on Chromium)
7 years, 5 months ago (2013-07-02 23:35:18 UTC) #19
Message was sent while issue was closed.
Committed patchset #6 manually as r209814 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698