Hi Chris, On Tue, Sep 2, 2008 at 11:00 AM, Chris Hanson <[EMAIL PROTECTED]> wrote: > On Sep 1, 2008, at 3:46 AM, XiaoGang Li wrote: > >> hi, list, I have an uninstaller application , which is used to delete >> the files installed; and also i have a file which located in the current >> user's directory, like the ~/Library/LaunchAgents/com.****.plist. and how >> can i delete this kind of file, i have tried the >> AuthorizationExecuteWithPrivileges >> API, it seems not workable, do i give a wrong flag value or something >> else? > > NEVER use AuthorizationExecuteWithPrivileges like that. > > That is not what AuthorizationExecuteWithPrivileges is for.
Perhaps you could expand on that? Whilst it may not be what's required in this case, the documentation specifically states that for installers should use AuthorizationExceuteWithPrivileges to perform privileged tasks, such as copying files (and by implication, removing files) from restricted directories. <http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/02authconcepts/chapter_2_section_8.html#//apple_ref/doc/uid/TP30000995-CH205-TPXREF23> On a separate note, I'm aware that the best practice for implementing privileged helper tools has changed recently and the documentation appears to be out of date. I believe there's a sample somewhere that illustrates the new procedure. I had assumed that Apple would be on the case with updating the documentation; I'll post a bug report at some point. -- Chris _______________________________________________ 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]