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

Unified Diff: net/socket/unix_domain_listen_socket_posix.cc

Issue 382143005: Supports DevTools socket access authentication based on Android permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Commented process_id Created 6 years, 4 months 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
Index: net/socket/unix_domain_listen_socket_posix.cc
diff --git a/net/socket/unix_domain_listen_socket_posix.cc b/net/socket/unix_domain_listen_socket_posix.cc
index 7bab4ffcb7fe0c9df40cbfc6869969f5e61a4954..dc7c19c9663863a1f9fdd43bdfaed1be3a49bfbf 100644
--- a/net/socket/unix_domain_listen_socket_posix.cc
+++ b/net/socket/unix_domain_listen_socket_posix.cc
@@ -113,10 +113,9 @@ void UnixDomainListenSocket::Accept() {
SocketDescriptor conn = StreamListenSocket::AcceptSocket();
if (conn == kInvalidSocket)
return;
- uid_t user_id;
- gid_t group_id;
- if (!UnixDomainServerSocket::GetPeerIds(conn, &user_id, &group_id) ||
- !auth_callback_.Run(user_id, group_id)) {
+ UnixDomainServerSocket::Credentials credentials;
+ if (!UnixDomainServerSocket::GetPeerCredentials(conn, &credentials) ||
+ !auth_callback_.Run(credentials)) {
if (IGNORE_EINTR(close(conn)) < 0)
LOG(ERROR) << "close() error";
return;
« no previous file with comments | « net/socket/unix_domain_client_socket_posix_unittest.cc ('k') | net/socket/unix_domain_listen_socket_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698