Changeset 166103 in webkit
- Timestamp:
- Mar 21, 2014 3:43:25 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r166098 r166103 1 2014-03-21 Sam Weinig <sam@webkit.org> 2 3 [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2 4 https://bugs.webkit.org/show_bug.cgi?id=130528 5 6 Reviewed by Tim Horton. 7 8 * Platform/IPC/Connection.h: 9 * Platform/IPC/mac/ConnectionMac.cpp: 10 (IPC::Connection::getAuditToken): 11 Expose the audit data if available. 12 13 * NetworkProcess/mac/RemoteNetworkingContext.mm: 14 (WebKit::RemoteNetworkingContext::sourceApplicationAuditData): 15 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 16 (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData): 17 Pass the audit data corresponding to the UIProcess. 18 19 * Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements. 20 * Configurations/NetworkProcess.xcconfig: 21 * Configurations/NetworkService.Development.xcconfig: 22 * Configurations/NetworkService.xcconfig: 23 * Configurations/WebContent-iOS.entitlements: 24 Add entitlement allowing the audit data to be used. 25 1 26 2014-03-21 Tim Horton <timothy_horton@apple.com> 2 27 -
trunk/Source/WebKit2/Configurations/Network-iOS.entitlements
r166095 r166103 3 3 <plist version="1.0"> 4 4 <dict> 5 <key>com.apple.private.allow-explicit-graphics-priority</key> 6 <true/> 7 <key>com.apple.private.webinspector.allow-remote-inspection</key> 8 <true/> 9 <key>dynamic-codesigning</key> 10 <true/> 11 <key>com.apple.private.assets.accessible-asset-types</key> 12 <array> 13 <string>com.apple.MobileAsset.WebKitBlocklist</string> 14 </array> 5 <key>com.apple.private.network.socket-delegate</key> 6 <true/> 15 7 </dict> 16 8 </plist> -
trunk/Source/WebKit2/Configurations/NetworkProcess.xcconfig
r162104 r166103 30 30 EXCLUDED_SHIM_FILE_NAME_iphoneos = SecItemShim.dylib; 31 31 EXCLUDED_SHIM_FILE_NAME_iphonesimulator = $(EXCLUDED_SHIM_FILE_NAME_iphoneos); 32 33 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/Network-iOS.entitlements 34 CODE_SIGN_ENTITLEMENTS[sdk=iphonesimulator*] = Configurations/Network-iOS.entitlements -
trunk/Source/WebKit2/Configurations/NetworkService.Development.xcconfig
r164547 r166103 30 30 INFOPLIST_FILE_macosx = NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist; 31 31 INFOPLIST_FILE_iphoneos = NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist; 32 33 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/Network-iOS.entitlements 34 CODE_SIGN_ENTITLEMENTS[sdk=iphonesimulator*] = Configurations/Network-iOS.entitlements -
trunk/Source/WebKit2/Configurations/NetworkService.xcconfig
r164547 r166103 30 30 INFOPLIST_FILE_macosx = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist; 31 31 INFOPLIST_FILE_iphoneos = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist; 32 33 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/Network-iOS.entitlements 34 CODE_SIGN_ENTITLEMENTS[sdk=iphonesimulator*] = Configurations/Network-iOS.entitlements -
trunk/Source/WebKit2/Configurations/WebContent-iOS.entitlements
r165514 r166103 3 3 <plist version="1.0"> 4 4 <dict> 5 <key>com.apple.private.allow-explicit-graphics-priority</key> 6 <true/> 7 <key>com.apple.private.webinspector.allow-remote-inspection</key> 8 <true/> 9 <key>dynamic-codesigning</key> 10 <true/> 11 <key>com.apple.private.assets.accessible-asset-types</key> 12 <array> 13 <string>com.apple.MobileAsset.WebKitBlocklist</string> 14 </array> 5 <key>com.apple.private.allow-explicit-graphics-priority</key> 6 <true/> 7 <key>com.apple.private.network.socket-delegate</key> 8 <true/> 9 <key>com.apple.private.webinspector.allow-remote-inspection</key> 10 <true/> 11 <key>dynamic-codesigning</key> 12 <true/> 13 <key>com.apple.private.assets.accessible-asset-types</key> 14 <array> 15 <string>com.apple.MobileAsset.WebKitBlocklist</string> 16 </array> 15 17 </dict> 16 18 </plist> -
trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
r166031 r166103 27 27 #import "RemoteNetworkingContext.h" 28 28 29 #import "NetworkProcess.h" 29 30 #import "SessionTracker.h" 30 31 #import "WebErrors.h" … … 70 71 RetainPtr<CFDataRef> RemoteNetworkingContext::sourceApplicationAuditData() const 71 72 { 72 return nil; 73 #if PLATFORM(IOS) 74 audit_token_t auditToken; 75 if (!NetworkProcess::shared().parentProcessConnection()->getAuditToken(auditToken)) 76 return nullptr; 77 return adoptCF(CFDataCreate(0, (const UInt8*)&auditToken, sizeof(auditToken))); 78 #else 79 return nullptr; 80 #endif 73 81 } 74 82 -
trunk/Source/WebKit2/Platform/IPC/Connection.h
r166031 r166103 115 115 static bool identifierIsNull(Identifier identifier) { return identifier.port == MACH_PORT_NULL; } 116 116 xpc_connection_t xpcConnection() { return m_xpcConnection; } 117 117 bool getAuditToken(audit_token_t&); 118 118 #elif USE(UNIX_DOMAIN_SOCKETS) 119 119 typedef int Identifier; -
trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp
r166031 r166103 36 36 #include <xpc/xpc.h> 37 37 38 #if __has_include(<xpc/private.h>) 39 #include <xpc/private.h> 40 #endif 41 42 extern "C" void xpc_connection_get_audit_token(xpc_connection_t, audit_token_t*); 43 38 44 namespace IPC { 39 45 … … 512 518 } 513 519 520 bool Connection::getAuditToken(audit_token_t& auditToken) 521 { 522 if (!m_xpcConnection) 523 return false; 524 525 xpc_connection_get_audit_token(m_xpcConnection, &auditToken); 526 return true; 527 } 528 514 529 } // namespace IPC -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r166096 r166103 2744 2744 7801C095142290C400FAF9AF /* WebHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebHitTestResult.cpp; sourceTree = "<group>"; }; 2745 2745 7801C096142290C400FAF9AF /* WebHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHitTestResult.h; sourceTree = "<group>"; }; 2746 7C0BB9A718DCDE890006C086 /* iOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = iOS.xcconfig; sourceTree = "<group>"; }; 2747 7C0BB9A818DCDE890006C086 /* WebContent-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "WebContent-iOS.entitlements"; sourceTree = "<group>"; }; 2748 7C0BB9A918DCDF5A0006C086 /* Network-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Network-iOS.entitlements"; sourceTree = "<group>"; }; 2746 2749 7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKPluginInformation.cpp; sourceTree = "<group>"; }; 2747 2750 7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPluginInformation.h; sourceTree = "<group>"; }; … … 3807 3810 1A4F976B100E7B6600637A18 /* DebugRelease.xcconfig */, 3808 3811 1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */, 3812 7C0BB9A718DCDE890006C086 /* iOS.xcconfig */, 3813 7C0BB9A918DCDF5A0006C086 /* Network-iOS.entitlements */, 3809 3814 510CC8461613C7C600D03ED3 /* NetworkProcess.xcconfig */, 3810 3815 BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */, … … 3819 3824 5183B3931379F85C00E8754E /* Shim.xcconfig */, 3820 3825 1A4F976E100E7B6600637A18 /* Version.xcconfig */, 3826 7C0BB9A818DCDE890006C086 /* WebContent-iOS.entitlements */, 3821 3827 5DAD7294116FF70B00EE5396 /* WebContentProcess.xcconfig */, 3822 3828 BCACC40F16B0B8A800B6E092 /* WebContentService.Development.xcconfig */, -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r166031 r166103 25 25 26 26 #include "config.h" 27 #include "WebFrameNetworkingContext.h" 27 28 28 29 #include "SessionTracker.h" 29 30 #include "WebCookieManager.h" 30 #include "WebFrameNetworkingContext.h"31 31 #include "WebPage.h" 32 #include "WebProcess.h" 32 33 #include <WebCore/Frame.h> 33 34 #include <WebCore/FrameLoader.h> … … 91 92 RetainPtr<CFDataRef> WebFrameNetworkingContext::sourceApplicationAuditData() const 92 93 { 93 return RetainPtr<CFDataRef>(); 94 #if PLATFORM(IOS) 95 audit_token_t auditToken; 96 if (!WebProcess::shared().parentProcessConnection()->getAuditToken(auditToken)) 97 return nullptr; 98 return adoptCF(CFDataCreate(0, (const UInt8*)&auditToken, sizeof(auditToken))); 99 #else 100 return nullptr; 101 #endif 94 102 } 95 103
Note: See TracChangeset
for help on using the changeset viewer.