Re: Still having problume with Security API
Re: Still having problume with Security API
- Subject: Re: Still having problume with Security API
- From: Ryan Dary <email@hidden>
- Date: Wed, 16 May 2001 08:15:27 -0700
Actually, when you call the AuthorizationExecuteWithPrivileges, it must
be altering the argv array that is passed in because you don't need to
pass it the path to the program as the first arg, as might be expected.
The program being executed will still receive the path as the first [0]
arg.
- Ryan
On Tuesday, May 15, 2001, at 04:15 PM, email@hidden wrote:
On Wednesday, May 16, 2001, at 12:56 AM, Ryan Dary wrote:
Your argv doesn't have a NULL termination:
char * argv[3];
[...]
argv[0] = SOURCE;
argv[1] = DESINATION;
argv[2] = NULL;
Try adding that..
- Ryan
argv[0] should be the application name, so it's something like:
char *argv[4];
argv[0]=PROGRAM; // "cp"
argv[1]=SOURCE;
argv[2]=DESTINATION;
argv[3]=NULL;
--
Pelle Johansson
<email@hidden>
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev