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: Tue, 15 May 2001 15:56:39 -0700
Your argv doesn't have a NULL termination:
char * argv[3];
[...]
argv[0] = SOURCE;
argv[1] = DESINATION;
argv[2] = NULL;
Try adding that..
- Ryan
On Tuesday, May 15, 2001, at 03:08 PM, email@hidden wrote:
This is probable a stupid mistake, but i cant get this thing to work no
mater what. Hear is the code and the error message i am getting from
the
system.
ERROR Message:
/bin/cp: /tmp/smb.conf: No such file or directory
Function i used:
- (void)doCommand
{
OSStatus err = 0;
char *argv[2];
argv[0] = SOURCE;
argv[1] = DESINATION;
if(![self authenticate])
return;
err = AuthorizationExecuteWithPrivileges(authorizationRef, COMMAND,
0,
argv, NULL);
if(err!=0)
{
NSBeep();
NSLog(@"Error %d in AuthorizationExecuteWithPrivileges",err);
}
}
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev