|
List Info
Thread: How to run an app bundle as root?
|
|
| How to run an app bundle as root? |

|
2006-11-03 16:54:29 |
|
Yes, that would be my ideal approach. I simply don't have the time to implement this at the moment however (I need a running prototype). Besides, the OS X Installer operates this way already.
Thanks, Arve Knudsen
On 11/3/06, Bob Ippolito < bob redivi.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
bob redivi.com> wrote:
On 11/3/06, Arve Knudsen < arve.knudsen gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">arve.knudsen gmail.com> wrote: > Hello > > I'm writing a custom installation tool for OS X, which needs to run with
> root privileges. The installation tool is packaged into an app bundle by way > of py2app. What I basically need to know is the best way of attaining root > privileges in the tool, must this be done with
> AuthorizationExecuteWithPrivileges? I first tried this > approach, writing a wrapper script which executes the main script in a > privileged Python process. This doesn't quite work however, the resulting
> window behaves completely different from what one would expect. That is, it > can't get focus and I can't command-tab to it. > > I thought of another approach, which is to first run a privileged program
> which setuid's the bundle executable, and then re-execute the bundle. Would > this be a good approach, and how can I execute the bundle programmatically? >
Sounds like you're taking the wrong strategy here. The idea is to use
the privileged helper process to do *only* privileged operations. Don't use it for UI stuff. That's just dangerous.
-bob
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|