Re: AuthorizationExecuteWithPrivileges question
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