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 241863002: Extend UnixDomainSocket::RecvMsg to return sender's PID (Closed)

Created:
6 years, 8 months ago by mdempsky
Modified:
6 years, 8 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Extend UnixDomainSocket::RecvMsg to return sender's PID BUG=357670 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266048

Patch Set 1 #

Patch Set 2 : Move GetPeerPid under sandbox/linux/services #

Patch Set 3 : More unit tests #

Patch Set 4 : Tweak comments #

Patch Set 5 : Fail if fd is not a connected socket #

Patch Set 6 : Make sure AF_INET sockets fail correctly #

Patch Set 7 : peer_pid.h doesn't need build_config.h #

Patch Set 8 : Use SO_PASSCRED and SCM_CREDENTIALS instead of SO_PEERCRED #

Patch Set 9 : Style guide doesn't allow default arguments and discourages unnecessary function overloading #

Total comments: 12

Patch Set 10 : Remove sandbox unit tests for followup CL #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -8 lines) Patch
M base/posix/unix_domain_socket_linux.h View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -1 line 5 comments Download
M base/posix/unix_domain_socket_linux.cc View 1 2 3 4 5 6 7 8 7 chunks +36 lines, -7 lines 0 comments Download
M base/posix/unix_domain_socket_linux_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +58 lines, -0 lines 3 comments Download

Messages

Total messages: 18 (0 generated)
mdempsky
Here's my first stab at an API for this. I've tested that the new tests ...
6 years, 8 months ago (2014-04-18 01:11:30 UTC) #1
mdempsky
Grr, so I've hit an impasse in trying to make use of this API safely, ...
6 years, 8 months ago (2014-04-18 06:14:46 UTC) #2
mdempsky
Updated the code to use SO_PASSCRED and SCM_CREDENTIALS instead of SO_PEERCRED. I'm not happy with ...
6 years, 8 months ago (2014-04-18 23:23:25 UTC) #3
mdempsky
(Also, followup CL is at https://codereview.chromium.org/240463005/.)
6 years, 8 months ago (2014-04-19 00:44:02 UTC) #4
mdempsky
jln: Ping? Any thoughts, or do you want to wait until I'm back in SFO ...
6 years, 8 months ago (2014-04-23 21:47:07 UTC) #5
jln (very slow on Chromium)
On 2014/04/23 21:47:07, mdempsky wrote: > jln: Ping? Any thoughts, or do you want to ...
6 years, 8 months ago (2014-04-24 01:42:06 UTC) #6
jln (very slow on Chromium)
Let's land the base/ change first and independently. I didn't review the sandbox/ part yet, ...
6 years, 8 months ago (2014-04-24 18:32:58 UTC) #7
mdempsky
https://codereview.chromium.org/241863002/diff/140001/base/posix/unix_domain_socket_linux.cc File base/posix/unix_domain_socket_linux.cc (right): https://codereview.chromium.org/241863002/diff/140001/base/posix/unix_domain_socket_linux.cc#newcode109 base/posix/unix_domain_socket_linux.cc:109: const unsigned payload_len = cmsg->cmsg_len - CMSG_LEN(0); On 2014/04/24 ...
6 years, 8 months ago (2014-04-24 19:00:34 UTC) #8
jln (very slow on Chromium)
lgtm, this is ready for owner review.
6 years, 8 months ago (2014-04-24 19:23:55 UTC) #9
jln (very slow on Chromium)
https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h File base/posix/unix_domain_socket_linux.h (right): https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h#newcode13 base/posix/unix_domain_socket_linux.h:13: #include "base/process/process_handle.h" You could forward declare base::ProcessId.
6 years, 8 months ago (2014-04-24 19:24:38 UTC) #10
mdempsky
https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h File base/posix/unix_domain_socket_linux.h (right): https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h#newcode13 base/posix/unix_domain_socket_linux.h:13: #include "base/process/process_handle.h" On 2014/04/24 19:24:38, jln wrote: > You ...
6 years, 8 months ago (2014-04-24 20:23:30 UTC) #11
mdempsky
willchan: PTAL for base OWNERS approval.
6 years, 8 months ago (2014-04-24 20:24:45 UTC) #12
willchan no longer on Chromium
lgtm https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h File base/posix/unix_domain_socket_linux.h (right): https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h#newcode13 base/posix/unix_domain_socket_linux.h:13: #include "base/process/process_handle.h" On 2014/04/24 20:23:30, mdempsky wrote: > ...
6 years, 8 months ago (2014-04-24 20:44:04 UTC) #13
mdempsky
https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h File base/posix/unix_domain_socket_linux.h (right): https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h#newcode13 base/posix/unix_domain_socket_linux.h:13: #include "base/process/process_handle.h" On 2014/04/24 20:44:04, willchan wrote: > I'm ...
6 years, 8 months ago (2014-04-24 20:59:13 UTC) #14
willchan no longer on Chromium
https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h File base/posix/unix_domain_socket_linux.h (right): https://codereview.chromium.org/241863002/diff/160001/base/posix/unix_domain_socket_linux.h#newcode13 base/posix/unix_domain_socket_linux.h:13: #include "base/process/process_handle.h" On 2014/04/24 20:59:14, mdempsky wrote: > On ...
6 years, 8 months ago (2014-04-24 21:09:56 UTC) #15
mdempsky
The CQ bit was checked by mdempsky@chromium.org
6 years, 8 months ago (2014-04-24 21:14:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mdempsky@chromium.org/241863002/160001
6 years, 8 months ago (2014-04-24 21:44:57 UTC) #17
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 23:42:46 UTC) #18
Message was sent while issue was closed.
Change committed as 266048

Powered by Google App Engine
This is Rietveld 408576698