On Nov 6, 2008, at 12:20 , Glover,David wrote:
Hi all, I need to remove a folder from within /Applications/OurCompany, so I'm using Authorization Services to get Admin rights, and then using removeFileAtPath to remove the folder.When I'm logged on as admin, this works perfectly fine. When I'm loggedin as a standard user, I authenticate with the admin username and password, authorization is granted ok, but then it still can't delete the folder. Can anybody suggest what I might be missing here? Perhaps I have mis-understood the Apple security documentation?
Authorization rights just ensure that the security server thinks that somebody /should/ be allowed to do something (i.e., authenticates that the given user has the specified right). It doesn't actually escalate privileges in the running process in any way. What you need to do is preauthorize the user, then convert the authorization to external form and feed it to a helper utility like /usr/libexec/authopen or a helper utility that you create yourself.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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 [EMAIL PROTECTED]