开发者

OS X Application Authorization

开发者 https://www.devze.com 2023-03-20 00:33 出处:网络
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=Secur

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 Authori开发者_StackOverflow社区zation (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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号