• 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: setiud and AuthorizationExecuteWithPriviledges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setiud and AuthorizationExecuteWithPriviledges


  • Subject: Re: setiud and AuthorizationExecuteWithPriviledges
  • From: Scott Anguish <email@hidden>
  • Date: Mon, 10 Feb 2003 03:43:38 -0500

The const part of the const char * can be ignored (or you can cast your char * to const char *). Apple's example code ignores the const aspect of it.

what you need is the current full path to the tool right?

[NSBundle mainBundle]

will give you an NSBundle instance that points to the application wrapper.. from there you can use pathForResource:ofType: to find the path to the tool.

so, then convert the full path using -UTF8String, and that'll give you a const char * which you can then pass to the Auth routine.



On Monday, February 10, 2003, at 03:20 AM, Carl Gherardi wrote:

If I set this up statically as above it works fine. but as soon as I move
the application it stops working, as it requires the full pathname, and the
data structure is const.

As a simple C question - is there a way to get around this?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: setiud and AuthorizationExecuteWithPriviledges
  • Next by Date: Removing Entry from Addressbook externally
  • Previous by thread: setiud and AuthorizationExecuteWithPriviledges
  • Next by thread: Removing Entry from Addressbook externally
  • Index(es):
    • Date
    • Thread