From 607399f1e62504106f3d2dd5dc279800d0fbf66d Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 30 Jul 2016 20:41:03 -0400 Subject: [PATCH] Comment on why agent is connecting to installer instead of vise versa --- Sparkle/InstallerProgress/InstallerProgressAppController.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sparkle/InstallerProgress/InstallerProgressAppController.m b/Sparkle/InstallerProgress/InstallerProgressAppController.m index f9d8813b..888d0e45 100644 --- a/Sparkle/InstallerProgress/InstallerProgressAppController.m +++ b/Sparkle/InstallerProgress/InstallerProgressAppController.m @@ -77,6 +77,9 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3; [self cleanupAndExitWithStatus:EXIT_FAILURE]; } + // Note that we are connecting to the installer rather than the installer connecting to us + // This difference is significant. We shouldn't have a model where the 'server' tries to connect to a 'client', + // nor have a model where a process that runs at the highest level (the installer can run as root) tries to connect to a user level agent or process BOOL systemDomain = arguments[2].boolValue; NSXPCConnectionOptions connectionOptions = systemDomain ? NSXPCConnectionPrivileged : 0; _connection = [[NSXPCConnection alloc] initWithMachServiceName:SUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) options:connectionOptions];