Stephane Paquet
Stephane Paquet

Reputation: 2344

OS X Application Authorization

I'm looking forward to have an update on the following topic as it does not compile when using Xcode 4.1 and higher (https://developer.apple.com/library/mac/navigation/#section=Topics&topic=Security) and more particularly on Application Authorization (such as hilighted in BetterAuthorizationSample).

The idea I have is to write a simple application to access some plist fils in protected areas of the OS X filesystem (the way macpilot does) to tweak Time Machine.

The application I've written has to access one file in /System/Library/LaunchDaemons/

The above example introduces a way to give an application access rights for a given time. In my case I need write permission for a file and I should be prompted by the OS to enter my administrator name and password to apply changes to the right file.

Upvotes: 4

Views: 753

Answers (1)

Boris
Boris

Reputation: 360

You need an authorized helper which actually does the file modifications and your application is just an UI passing information to that helper.

Read this: http://www.bornsleepy.com/bornsleepy/os-x-helper-applications

Example code on Github (with a good readme): https://github.com/elegantchaos/ECHelper

Apples documentation on this topic: http://developer.apple.com/library/mac/#documentation/security/conceptual/authorization_concepts/01introduction/introduction.html

Upvotes: 1

Related Questions