• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Authorization and removing folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Authorization and removing folders (From: "Glover,David" <email@hidden>)

  • Prev by Date: Re: [Q] How to add nested items to NSOutlineView?
  • Next by Date: Re: Core data, NSArrayController and different nibs
  • Previous by thread: Authorization and removing folders
  • Next by thread: How to convert NSString to wstrings?
  • Index(es):
    • Date
    • Thread