Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I just downloaded the iAntivirus app from the Mac App Store. I wanted it to scan my whole hard drive for viruses, so it presented me with an Open dialog box pointing at the root of the hard drive (so that the computer can get access outside of its sandbox). I clicked ok, and the app started.

What I found odd was that I was never presented with a login box. The program was given access to files in the System folder, Library folder, etc. that only I could edit by typing in an admin username and password. Is this a security issue with sandboxing or is that the way it's supposed to work?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The App can have read/write access to a location if it gets your permission using an entitlement as part of the App Sandbox, in other words this is how its suppose to work. The App is code-signed and trusted, its asking your permission, in theory all should be good.

As noted in the Mac Technology overview:

App Sandbox

Introduced in OS X v10.7, App Sandbox provides a last line of defense against stolen, corrupted, or deleted user data if malicious code exploits your app. App Sandbox also minimizes the damage from coding errors. Its strategy is twofold:

App Sandbox enables you to describe how your app interacts with the system. The system then grants your app only the access it needs to get its job done, and no more.

App Sandbox allows the user to transparently grant your app additional access by using Open and Save dialogs, drag and drop, and other familiar user interactions.

Specifically a developer can implement the following entitlement as noted here in Enabling App Sandbox, this is exactly what you described in your question, so this is probably the entitlement that the A/V program developer had utilized to obtain just read and write access.

com.apple.security.files.user-selected.read-write

Read/write access to files the user has selected using an Open or Save dialog

Note that this is not the same as true administrator user, since the program would not be granted the execute privilege.

share|improve this answer
    
Wow, I understand why it works but it's still a little surprising. According to what you said, I could give an app access to another user's desktop folder (or any other folder I don't have permission to access) as long as I open up one of its parent folders in an Open dialog. It kind of defeats the purpose of permissions unless I'm not seeing it correctly. –  Jack Humphries Sep 2 '12 at 1:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.