Title: [167603] trunk/Source/WebKit2
- Revision
- 167603
- Author
- [email protected]
- Date
- 2014-04-21 12:10:33 -0700 (Mon, 21 Apr 2014)
Log Message
Check the com.apple.security.network.client entitlement for all processes
https://bugs.webkit.org/show_bug.cgi?id=131942
<rdar://problem/12354188>
Reviewed by Dan Bernstein.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (167602 => 167603)
--- trunk/Source/WebKit2/ChangeLog 2014-04-21 19:05:23 UTC (rev 167602)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-21 19:10:33 UTC (rev 167603)
@@ -1,3 +1,17 @@
+2014-04-21 Anders Carlsson <[email protected]>
+
+ Check the com.apple.security.network.client entitlement for all processes
+ https://bugs.webkit.org/show_bug.cgi?id=131942
+ <rdar://problem/12354188>
+
+ Reviewed by Dan Bernstein.
+
+ * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
+ (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
+ (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
+
2014-04-20 Dan Bernstein <[email protected]>
[Cocoa] Remove interfaces in the To Be Removed groups
Modified: trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (167602 => 167603)
--- trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm 2014-04-21 19:05:23 UTC (rev 167602)
+++ trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm 2014-04-21 19:10:33 UTC (rev 167603)
@@ -38,22 +38,6 @@
: XPCServiceInitializerDelegate(connection, initializerMessage)
{
}
-
-#if PLATFORM(MAC)
- virtual bool checkEntitlements() override
- {
- if (!isClientSandboxed())
- return true;
-
- if (!hasEntitlement("com.apple.security.network.client")) {
- NSLog(@"Application does not have the 'com.apple.security.network.client' entitlement.");
- return false;
- }
-
- return true;
- }
-#endif
-
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (167602 => 167603)
--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h 2014-04-21 19:05:23 UTC (rev 167602)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h 2014-04-21 19:10:33 UTC (rev 167603)
@@ -42,7 +42,10 @@
virtual ~XPCServiceInitializerDelegate();
+#if PLATFORM(MAC)
virtual bool checkEntitlements();
+#endif
+
virtual bool getConnectionIdentifier(IPC::Connection::Identifier& identifier);
virtual bool getClientIdentifier(String& clientIdentifier);
virtual bool getClientProcessName(String& clientProcessName);
Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm (167602 => 167603)
--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm 2014-04-21 19:05:23 UTC (rev 167602)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm 2014-04-21 19:10:33 UTC (rev 167603)
@@ -50,9 +50,20 @@
{
}
+#if PLATFORM(MAC)
bool XPCServiceInitializerDelegate::checkEntitlements()
{
+ if (!isClientSandboxed())
+ return true;
+
+ // FIXME: Once we're 100% sure that a process can't access the network we can get rid of this requirement for all processes.
+ if (!hasEntitlement("com.apple.security.network.client")) {
+ NSLog(@"Application does not have the 'com.apple.security.network.client' entitlement.");
+ return false;
+ }
+
return true;
+#endif
}
bool XPCServiceInitializerDelegate::getConnectionIdentifier(IPC::Connection::Identifier& identifier)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes