From dfab64efdf584539ac8d3bb35f17e309ae0e8a0c Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 3 Mar 2024 17:41:12 -0800 Subject: [PATCH] Remove installer status & connection entitlement files (#2517) These entitlements are not easy to configure properly and most developers should not be using these services. Also simplify how to opt into enabling sandboxing entitlements for the Downloader XPC Service. --- Configurations/ConfigCommon.xcconfig | 15 +-------------- Configurations/ConfigInstallerConnection.xcconfig | 1 - Configurations/ConfigInstallerStatus.xcconfig | 1 - .../InstallerConnection.entitlements | 12 ------------ InstallerStatus/InstallerStatus.entitlements | 12 ------------ Sparkle.xcodeproj/project.pbxproj | 4 ---- 6 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 InstallerConnection/InstallerConnection.entitlements delete mode 100644 InstallerStatus/InstallerStatus.entitlements diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 9236ac0b..4c332693 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -78,25 +78,12 @@ INSTALLER_STATUS_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerStatus INSTALLER_LAUNCHER_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerLauncher DOWNLOADER_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.DownloaderService -// Initialize sandboxed entitlements variables to use no entitlements -// Don't modify these. See commented out section below instead. -DOWNLOADER_SANDBOXED_ENTITLEMENTS = -INSTALLER_CONNECTION_ENTITLEMENTS = -INSTALLER_STATUS_ENTITLEMENTS = - // The Downloader XPC Service is not sandboxed by default. -// Uncomment this line to enable Sandboxing for this service. +// Uncomment line to enable Sandboxing for this service. // If this is done, you *must* set a custom XPC_SERVICE_BUNDLE_ID_PREFIX for your app above. // Otherwise sandboxed apps that use the same sandboxed Downloader Service may conflict with each other. - //DOWNLOADER_SANDBOXED_ENTITLEMENTS = Downloader/Downloader.entitlements -// Similar to the Downloader XPC Service, uncomment these lines if you want to sandbox the Connection/Status services -// If this is done, you *must* set a custom XPC_SERVICE_BUNDLE_ID_PREFIX for your app above. - -//INSTALLER_CONNECTION_ENTITLEMENTS = InstallerConnection/InstallerConnection.entitlements -//INSTALLER_STATUS_ENTITLEMENTS = InstallerStatus/InstallerStatus.entitlements - // If your app file on disk is named "MyApp 1.1b4", Sparkle usually updates it // in place, giving you an app named 1.1b4 that is actually 1.2. Turn the diff --git a/Configurations/ConfigInstallerConnection.xcconfig b/Configurations/ConfigInstallerConnection.xcconfig index 3f1c9529..424985ed 100644 --- a/Configurations/ConfigInstallerConnection.xcconfig +++ b/Configurations/ConfigInstallerConnection.xcconfig @@ -4,6 +4,5 @@ INFOPLIST_FILE = InstallerConnection/Info.plist WRAPPER_EXTENSION = xpc PRODUCT_BUNDLE_IDENTIFIER = ${INSTALLER_CONNECTION_BUNDLE_ID} PRODUCT_NAME = ${INSTALLER_CONNECTION_NAME} -CODE_SIGN_ENTITLEMENTS = $(INSTALLER_CONNECTION_ENTITLEMENTS) GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) BUILDING_SPARKLE_SOURCES_EXTERNALLY=1 CLANG_MODULES_AUTOLINK = NO diff --git a/Configurations/ConfigInstallerStatus.xcconfig b/Configurations/ConfigInstallerStatus.xcconfig index 94be938d..24657cea 100644 --- a/Configurations/ConfigInstallerStatus.xcconfig +++ b/Configurations/ConfigInstallerStatus.xcconfig @@ -4,6 +4,5 @@ INFOPLIST_FILE = InstallerStatus/Info.plist WRAPPER_EXTENSION = xpc PRODUCT_BUNDLE_IDENTIFIER = ${INSTALLER_STATUS_BUNDLE_ID} PRODUCT_NAME = ${INSTALLER_STATUS_NAME} -CODE_SIGN_ENTITLEMENTS = $(INSTALLER_STATUS_ENTITLEMENTS) GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) BUILDING_SPARKLE=0 BUILDING_SPARKLE_SOURCES_EXTERNALLY=1 CLANG_MODULES_AUTOLINK = NO diff --git a/InstallerConnection/InstallerConnection.entitlements b/InstallerConnection/InstallerConnection.entitlements deleted file mode 100644 index fa7d47e6..00000000 --- a/InstallerConnection/InstallerConnection.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.temporary-exception.mach-lookup.global-name - - $(PRODUCT_BUNDLE_IDENTIFIER)-spki - - - diff --git a/InstallerStatus/InstallerStatus.entitlements b/InstallerStatus/InstallerStatus.entitlements deleted file mode 100644 index 0cceb6d0..00000000 --- a/InstallerStatus/InstallerStatus.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.temporary-exception.mach-lookup.global-name - - $(PRODUCT_BUNDLE_IDENTIFIER)-spks - - - diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 7e1267e3..eaa130e2 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -1055,8 +1055,6 @@ 7214B8851D45AD9A00CB5CED /* SPUInstallationType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPUInstallationType.h; sourceTree = ""; }; 72162B071C82C9600013C1C5 /* SULocalizations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SULocalizations.h; sourceTree = ""; }; 721652671D3C8FED00FD13D8 /* SUInstallerLauncherStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SUInstallerLauncherStatus.h; path = InstallerLauncher/SUInstallerLauncherStatus.h; sourceTree = SOURCE_ROOT; }; - 7218EC362623F31C008FECF3 /* InstallerConnection.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = InstallerConnection.entitlements; sourceTree = ""; }; - 7218EC372623F32E008FECF3 /* InstallerStatus.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = InstallerStatus.entitlements; sourceTree = ""; }; 721AB11626C777D900D34A86 /* SPUDownloadDataPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPUDownloadDataPrivate.h; sourceTree = ""; }; 721BC2061D17A532002BC71E /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; 721BC2081D17A553002BC71E /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; @@ -2233,7 +2231,6 @@ 724BB36E1D31D0B7005D534A /* SUInstallerConnectionProtocol.h */, 724BB3851D32A167005D534A /* SUXPCInstallerConnection.h */, 724BB3861D32A167005D534A /* SUXPCInstallerConnection.m */, - 7218EC362623F31C008FECF3 /* InstallerConnection.entitlements */, ); name = InstallerConnection; path = ../InstallerConnection; @@ -2250,7 +2247,6 @@ 7267E5DD1D3D8F5A00D1BF90 /* SUStatusInfoProtocol.h */, 724BB3A61D33461B005D534A /* SUXPCInstallerStatus.h */, 724BB3A71D33461B005D534A /* SUXPCInstallerStatus.m */, - 7218EC372623F32E008FECF3 /* InstallerStatus.entitlements */, ); name = InstallerStatus; path = ../InstallerStatus;