On Jun 15, 2011, at 10:35 AM, Nick Zitzmann wrote:

> On Jun 15, 2011, at 9:17 AM, Sean McBride wrote:
> 
>> I need to copy files to /Library/Application Support/My Company.  For users 
>> with lesser privileges, I'll need to prompt for authorization.
>> 
>> (I'm not writing an installer.  But within my app, I present an open panel 
>> for a user to choose a special config file that needs to be stored where any 
>> user can read it.)
>> 
>> After googling, it seems the best two choices are BetterAuthorizationSample 
>> and AuthorizationExecuteWithPrivileges().
> 
> You'll probably get a better answer on the apple-cdsa list, since that list 
> is for discussion of the Security framework. But if you're just going to make 
> a one-off invocation of /bin/cp or some other tool in /bin or /usr/bin or 
> /sbin or whatever, then using AEWP() to directly invoke the tool is probably 
> going to be okay. The danger in AEWP() is executing something that might do 
> something malicious, but I think you can trust that what's installed in /bin 
> isn't going to trigger a r00tkit.

Something else to consider is the authopen tool 
<http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/authopen.1.html>.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to