Use the authorization environment when requesting for auth

This probably went missing accidently when I did a merge
This commit is contained in:
Zorg committed 2016-07-01 20:13:39 -04:00
1 parent a6ccd4cfa9
commit a7aad3b16a
1 file changed
+1 -1
+1 -1
View File
@@ -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) {