[Mac] Enable library validation for Networking & Storage XPC services
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jan 2018 19:34:48 +0000 (19:34 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jan 2018 19:34:48 +0000 (19:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173424
<rdar://problem/32386565>

Reviewed by Joseph Pecoraro.

* Configurations/BaseXPCService.xcconfig: Moved the definitions of
  WK_LIBRARY_VALIDATION_ENABLED and WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS from
  WebContentService.xcconfig to here and made them Mac-only at this level.
* Configurations/NetworkService.xcconfig: Also set OTHER_CODE_SIGN_FLAGS to
  WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS.
* Configurations/StorageService.xcconfig: Ditto.
* Configurations/WebContentService.xcconfig: Moved definitions from here to
  BaseXPCService.xcconfig.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227618 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Configurations/BaseXPCService.xcconfig
Source/WebKit/Configurations/NetworkService.xcconfig
Source/WebKit/Configurations/StorageService.xcconfig
Source/WebKit/Configurations/WebContentService.xcconfig

index 68e109d..16f1a93 100644 (file)
@@ -1,3 +1,20 @@
+2018-01-25  Dan Bernstein  <mitz@apple.com>
+
+        [Mac] Enable library validation for Networking & Storage XPC services
+        https://bugs.webkit.org/show_bug.cgi?id=173424
+        <rdar://problem/32386565>
+
+        Reviewed by Joseph Pecoraro.
+
+        * Configurations/BaseXPCService.xcconfig: Moved the definitions of
+          WK_LIBRARY_VALIDATION_ENABLED and WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS from
+          WebContentService.xcconfig to here and made them Mac-only at this level.
+        * Configurations/NetworkService.xcconfig: Also set OTHER_CODE_SIGN_FLAGS to
+          WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS.
+        * Configurations/StorageService.xcconfig: Ditto.
+        * Configurations/WebContentService.xcconfig: Moved definitions from here to
+          BaseXPCService.xcconfig.
+
 2018-01-25  David Hyatt  <hyatt@apple.com>
 
         Enable lines clamp support for Apple Mail by default
index 58a73f6..761c16e 100644 (file)
@@ -67,3 +67,13 @@ WK_XPC_SERVICE_INSERT_LIBRARIES_DIR = $(WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_$(WK
 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_ = $(WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_NO);
 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_NO = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/Frameworks;
 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_YES = @executable_path/$(WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK)/Frameworks;
+
+WK_LIBRARY_VALIDATION_ENABLED = $(WK_LIBRARY_VALIDATION_ENABLED_$(WK_EMPTY_$(WK_LIBRARY_VALIDATION_ENABLED)));
+WK_LIBRARY_VALIDATION_ENABLED_ = $(WK_LIBRARY_VALIDATION_ENABLED_NO);
+WK_LIBRARY_VALIDATION_ENABLED_NO = $(WK_LIBRARY_VALIDATION_ENABLED);
+WK_LIBRARY_VALIDATION_ENABLED_YES = YES;
+
+WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS[sdk=macosx*] = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_$(WK_XPC_SERVICE_VARIANT));
+WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_ = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_Normal);
+WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_Normal = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_$(WK_LIBRARY_VALIDATION_ENABLED));
+WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_YES = -o library;
index ec629ad..504f2da 100644 (file)
@@ -25,6 +25,8 @@
 
 WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE = Network-iOS;
 
+OTHER_CODE_SIGN_FLAGS = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS);
+
 PRODUCT_NAME = com.apple.WebKit.Networking;
 PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);
 INFOPLIST_FILE[sdk=iphone*] = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist;
index a02ef12..75761d8 100644 (file)
@@ -25,6 +25,8 @@
 
 WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE = Databases-iOS;
 
+OTHER_CODE_SIGN_FLAGS = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS);
+
 PRODUCT_NAME = $(WK_STORAGE_SERVICE_PRODUCT_NAME);
 PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);
 INFOPLIST_FILE = StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist;
index eb5ec17..f0c0259 100644 (file)
@@ -27,7 +27,7 @@ WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE = WebContent-iOS;
 
 CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = $(CODE_SIGN_ENTITLEMENTS_OSX_WITH_XPC_DOMAIN_EXTENSION_$(WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT));
 CODE_SIGN_ENTITLEMENTS_OSX_WITH_XPC_DOMAIN_EXTENSION_YES = Configurations/WebContent-OSX.entitlements;
-OTHER_CODE_SIGN_FLAGS[sdk=macosx*] = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS);
+OTHER_CODE_SIGN_FLAGS = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS);
 
 PRODUCT_NAME = $(PRODUCT_NAME_$(WK_XPC_SERVICE_VARIANT));
 PRODUCT_NAME_ = $(PRODUCT_NAME_Normal);
@@ -46,21 +46,11 @@ WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT_ = $(WK_WEBCONTENT_
 WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT_NO = $(WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT);
 WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT_YES = $(WK_RELOCATABLE_FRAMEWORKS);
 
-WK_LIBRARY_VALIDATION_ENABLED = $(WK_LIBRARY_VALIDATION_ENABLED_$(WK_EMPTY_$(WK_LIBRARY_VALIDATION_ENABLED)));
-WK_LIBRARY_VALIDATION_ENABLED_ = $(WK_LIBRARY_VALIDATION_ENABLED_NO);
-WK_LIBRARY_VALIDATION_ENABLED_NO = $(WK_LIBRARY_VALIDATION_ENABLED);
-WK_LIBRARY_VALIDATION_ENABLED_YES = YES;
-
 WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG = $(WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG_$(WK_EMPTY_$(WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG)));
 WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG_ = $(WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG_NO);
 WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG_NO = $(WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG);
 WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG_YES = $(USE_STAGING_INSTALL_PATH);
 
-WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_$(WK_XPC_SERVICE_VARIANT));
-WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_ = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_Normal);
-WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_Normal = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_$(WK_LIBRARY_VALIDATION_ENABLED));
-WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_YES = -o library;
-
 RUNLOOP_TYPE[sdk=macosx*] = NSRunLoop;
 RUNLOOP_TYPE[sdk=macosx10.13*] = _NSApplicationMain;
 RUNLOOP_TYPE[sdk=macosx10.12*] = _NSApplicationMain;