From 03dd9425d9c99beedfb5dbd650b8d779dcb86a25 Mon Sep 17 00:00:00 2001 From: "vitalybuka@chromium.org" Date: Sun, 1 Sep 2013 23:25:31 +0000 Subject: Listen for mDns traffic in setuid sandboxed Utility process. Local discovery listens for mDns traffic inside Utility process with enabled setuid sandbox (seccomp-BPF is not enabled). Setuid sandbox fails ::socket calls. To overcome this we use LocalDiscoveryMsg_SetSockets IPC message to pass two new UDP sockets created in browser process. These sockets will be provided for net::MDnsClient using net::PlatformSocketFactory. Added check to make sure that only Local Discovery Utility process handles LocalDiscovery* IPC messages. This code, as well as Windows version, is not executed without --enable-device-discovery switch. BUG=277654 Review URL: https://chromiumcodereview.appspot.com/23482003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220760 0039d316-1c4b-4281-b951-d872f2087c98 --- net/dns/mdns_client_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/dns/mdns_client_impl.h') diff --git a/net/dns/mdns_client_impl.h b/net/dns/mdns_client_impl.h index 9fe3f99..86a7ba9 100644 --- a/net/dns/mdns_client_impl.h +++ b/net/dns/mdns_client_impl.h @@ -58,13 +58,13 @@ class NET_EXPORT_PRIVATE MDnsConnection { const IPEndPoint& multicast_addr, SocketFactory* socket_factory); ~SocketHandler(); - int DoLoop(int rv); + int Bind(); int Start(); int Send(IOBuffer* buffer, unsigned size); private: - int BindSocket(); + int DoLoop(int rv); void OnDatagramReceived(int rv); // Callback for when sending a query has finished. -- cgit v1.1