[pygtk] running pygtk application with root privileges
Steve McClure
smcclure at racemi.com
Mon Mar 12 04:14:26 WST 2007
On Sun, 2007-03-11 at 17:48 +0200, Miki wrote:
> Hi all,
> 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 can write a C wrapper that is setuid that calls the pygtk
application. However, having the user enter the root password and
raising and lowering privilege would be better. However, I don't know
how to do that, though I'm sure it's possible.
Gnome has a /usr/sbin/userhelper program that is used to raise privilege
when performing root level activities from a normal users desktop.
>
>
> Any idea?
>
> Thanks,
> Miki
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
--
Steve McClure Racemi
email: smcclure at racemi.com 380 Interstate North Pkwy, SE
voice: 404-892-5850 Suite 250
fax: 404-892-7215 Atlanta, GA 30339
http://www.racemi.com
More information about the pygtk
mailing list