Re: Setting Proxy servers as administrator
Re: Setting Proxy servers as administrator
- Subject: Re: Setting Proxy servers as administrator
- From: "Duane Murphy" <email@hidden>
- Date: Thu, 4 Sep 2003 10:58:42 -0700
--- At Thu, 4 Sep 2003 17:39:07 +0000, Ryan G wrote:
>
Hey all,
>
>
I'm trying to programatically change the proxy settings in the system
>
preferences. I have been using the SystemConfiguration framework to do
>
this, and everything works fine, except I have to have root privileges to
>
call the commit changes function. But I know I should be able to change the
>
proxy settings with a user having their access rights set to administrator
>
(since I can use the System Preferences application to change the proxy
>
settings as my user, but I cannot run my application successfully unless I'm
>
root). Ideally, I would like to be able to use the Security framework to
>
get access to "system.preferences" rights to change the proxy settings.
>
>
Is anyone aware of what I need to do to do this?
You are doing nothing wrong. You do need root access. System Preferences
uses a helper application that is setuid-root to do it's dirty work.
Pressing the lock button kills that app. Pressing it again will turn it
back on.
For a GUI application the typical process is documented in
MoreAuthSample. You write a tool that does the secure work for you and
execute it with privileges when you need it. MoreAuthSample works well
for simple cases like this. More complex cases can use MoreAuthSample as
an example of what needs to happen.
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.