I am writing a cocoa application that needs to change proxy server settings (for this I use networksetup). The problem is that access to the proxy server settings requires a level of access to the system administrator. I tried running both administrators NSTaskas an administrator using the default Apple API (I used the wrapper STPrivilagedTaskfor it) and running the shell script as administrator. It works great anyway, but the problem is that my application needs to change settings so many times, and the user must type their password each time.
Anyway, can I get the privilege once and use it again and again?
source
share