• 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: Still having problume with Security API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Still having problume with Security API
      • From: Pelle Johansson <email@hidden>
  • Prev by Date: Re: changing entire content view of an NSWindow
  • Next by Date: Re: Still having problume with Security API
  • Previous by thread: No More Type/Creator Code Postings - Next topic, please
  • Next by thread: Re: Still having problume with Security API
  • Index(es):
    • Date
    • Thread