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; |
} |