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

Unified Diff: mojo/edk/embedder/platform_channel_utils_posix.cc

Issue 2500263004: Remove ipc/unix_domain_socket_util.* (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/embedder/platform_channel_utils_posix.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/platform_channel_utils_posix.cc
diff --git a/mojo/edk/embedder/platform_channel_utils_posix.cc b/mojo/edk/embedder/platform_channel_utils_posix.cc
index 9fda89ebb65c54920c63619b63333feb72f12ff4..689b6eec0dc9585a32b6edd2c3fef2a35d2d080b 100644
--- a/mojo/edk/embedder/platform_channel_utils_posix.cc
+++ b/mojo/edk/embedder/platform_channel_utils_posix.cc
@@ -247,7 +247,8 @@ ssize_t PlatformChannelRecvmsg(PlatformHandle h,
}
bool ServerAcceptConnection(PlatformHandle server_handle,
- ScopedPlatformHandle* connection_handle) {
+ ScopedPlatformHandle* connection_handle,
+ bool check_peer_user) {
DCHECK(server_handle.is_valid());
connection_handle->reset();
#if defined(OS_NACL)
@@ -260,7 +261,7 @@ bool ServerAcceptConnection(PlatformHandle server_handle,
return IsRecoverableError();
// Verify that the IPC channel peer is running as the same user.
- if (!IsPeerAuthorized(accept_handle.get())) {
+ if (check_peer_user && !IsPeerAuthorized(accept_handle.get())) {
return true;
}
« no previous file with comments | « mojo/edk/embedder/platform_channel_utils_posix.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698