From da185de61b5758a13c6e8e8cb570a31fdb07ad14 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 16 Jul 2016 13:04:10 -0400 Subject: [PATCH] Rationalize which domain we submit jobs under --- InstallerLauncher/SUInstallerLauncher.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InstallerLauncher/SUInstallerLauncher.m b/InstallerLauncher/SUInstallerLauncher.m index 1e2e6e47..efaf6c60 100644 --- a/InstallerLauncher/SUInstallerLauncher.m +++ b/InstallerLauncher/SUInstallerLauncher.m @@ -38,6 +38,12 @@ NSArray *arguments = @[hostBundleIdentifier, @(allowingInteraction).stringValue]; + // If the updater is running as the logged in user, we submit a job under the user domain + // However if the updater is running as root (which is experimental), we submit the job under the system domain + // We don't yet handle the updater running as the logged in user, and submitting a job under the system domain, which + // would remove the need for using AuthorizationExecuteWithPrivileges() in the installer. That would require knowing before hand + // if we will need to request authorization privileges, and that would prevent this code from being invoked silently/automatically. + // Additionally, we would want to remove AppKit references in the installer BOOL grantsSystemPrivilege = NO; AuthorizationRef auth = SUCreateAuthorization(&grantsSystemPrivilege); Boolean submittedJob = false;