• 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: AuthorizationExecuteWithPrivileges question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AuthorizationExecuteWithPrivileges question


  • Subject: Re: AuthorizationExecuteWithPrivileges question
  • From: "Shawn Erickson" <email@hidden>
  • Date: Sat, 9 Feb 2008 07:55:50 -0800

On Feb 9, 2008 5:56 AM, Stefán Kristjánsson <email@hidden> wrote:
> Gentlepeople,
>
> While writing a small personal hack I need to temporarily change the
> privileges on a root owned file and then back again to root. For this
> I use AEWP to run a small tool that calls chown to do its thing. This
> tool works as intended on PPC based Mac (G5) both in Tiger and Leo.
> To my surprice it did not work on Intel neither in Tiger or Leo. In
> my tool I the first line of code checks for the correct number of
> parameters by looking at the first parameter to the tool as in
> int main(int argc, char *argv[])

Ah you aren't terminating the args vector you supply to AEWP.

char* args[3];
args[0] = "foo";
args[1] = "bar";
args[2] = NULL;

...or...

char* args = {"foo", "bar", NULL};

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >AuthorizationExecuteWithPrivileges question (From: Stefán Kristjánsson <email@hidden>)

  • Prev by Date: Re: Problems getting NSURLConnection to work
  • Next by Date: Re: What's the replacement for GetMBarHeight?
  • Previous by thread: Re: AuthorizationExecuteWithPrivileges question
  • Next by thread: Graphing data from NSArrayController
  • Index(es):
    • Date
    • Thread