Hi all,

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().

But I'm not sure which to use.

The BAS example code docs say "You should only use BetterAuthorizationSample if 
your application needs ongoing access to privileged operations. [...]  On the 
other hand, if your application needs elevated privileges for a one-off task 
(like installing or uninstalling), you should consider using 
AuthorizationExecuteWithPrivileges directly."

But the docs for AEWP say "This function poses a security concern because it 
will indiscriminately run any tool or application, severely increasing the 
security risk. You should avoid the use of this function if possible." but also 
"You should use this function only to allow installers to run as root".

BAS seems quite complicated, but reading between the lines it seems AEWP is 
discouraged.

Anyone tried both?  Any advice?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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