Re: setiud and AuthorizationExecuteWithPriviledges
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.