• 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: 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


  • Follow-Ups:
    • Re: Still having problume with Security API
      • From: Guy Winslow <email@hidden>
    • Re: Still having problume with Security API
      • From: Guy Winslow <email@hidden>
  • Prev by Date: Paste text in active window?
  • Next by Date: Re: Volume Tracking in Cocoa without Carbon?
  • Previous by thread: Re: Still having problume with Security API
  • Next by thread: Re: Still having problume with Security API
  • Index(es):
    • Date
    • Thread