[pygtk] running pygtk application with root privileges
Miki
daily.cron at gmail.com
Sat Mar 17 00:43:28 WST 2007
Yeah , I did it with small C program that do setuid() and then running the
pygtk program, and it's working great :)
Thanks
Miki
On 3/16/07, Johan Dahlin <jdahlin at async.com.br> wrote:
>
> > I'm building an application that needs to change configuration files in
> > the /etc and in the /usr directories like the dhcp.conf file.
> > Any user should be able to run this application but to changes those
> > files root privileges is needed.
> >
> > How can I run pygtk application in root (setuid) mode or how can I ask
> > the user to enter the root password (in the pygtk env.) and then run the
> > application?
>
> You cannot run GTK+ application as setuid root, there's a check inside
> GTK+
> itself that forbids you from doing that. The reason is that there are
> several known "backdoors" for someone to regain root if you do so.
>
> --
> Johan Dahlin <jdahlin at async.com.br>
> Async Open Source
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20070316/3937ba75/at=
tachment.htm
More information about the pygtk
mailing list