Re: Authorization and removing folders
Re: Authorization and removing folders
- Subject: Re: Authorization and removing folders
- From: Jason Coco <email@hidden>
- Date: Thu, 6 Nov 2008 12:42:49 -0500
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
logged
in 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.Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden