From a7aad3b16a86b86295f04e364bec2fb0aef9b087 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 1 Jul 2016 20:13:39 -0400 Subject: [PATCH] Use the authorization environment when requesting for auth This probably went missing accidently when I did a merge --- Sparkle/SUFileManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index 4239824c..f8de6fbf 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -130,7 +130,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { (AuthorizationFlags)(kAuthorizationFlagDefaults | kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights | kAuthorizationFlagPreAuthorize); // This will test if we can gain authorization for running utlities as root - OSStatus copyStatus = AuthorizationCopyRights(_auth, &rights, kAuthorizationEmptyEnvironment, flags, NULL); + OSStatus copyStatus = AuthorizationCopyRights(_auth, &rights, (_environment != nil ? _environment.environment : kAuthorizationEmptyEnvironment), flags, NULL); if (copyStatus != errAuthorizationSuccess) { if (error != NULL) { if (copyStatus == errAuthorizationCanceled) {