AuthorizationExecuteWithPrivileges question
AuthorizationExecuteWithPrivileges question
- Subject: AuthorizationExecuteWithPrivileges question
- From: Stefán Kristjánsson <email@hidden>
- Date: Sat, 9 Feb 2008 13:56:38 +0000
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[])
To my surprice the value of argc differs between Intel and PPC. On
Intel it differs between calls to the tool, I have not seen that
happen on PPC. The docs for AEWP state: " The arguments you pass in
the arguments parameter are relayed to the new process’s argv
parameter." It does not say anything about argc.
My conclusion is that argc is not set to reflect the number of
parameters passed. Is this behavior of AEWP known to the subscribers
of this list and am I just struck by the bewilderment of ignorance ?_______________________________________________
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