On 11/3/06, Arve Knudsen <[EMAIL PROTECTED]> 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 _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig