running python scripts as suid root

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Mon, 8 Nov 1993 13:40:35 -0500

I note that there is a getuid/geteuid routine in posixmodule, but no
corresponding setuid. I would like to have a inet server daemon
written in python, but I need to setuid to the connecting users id.

Adding setuid to posixmodule is easy enough, but the fact that it was
left out suggests to me that maybe the security problems of doing so
are greater than I would guess. Is there any problems with running
python scripts SETUID root ( assuming of course that the scripts them
self are installed without write access ). /usr/bin/python doesn't
need to be SETUID as well as the python script, does it ? ( THAT
*WOULD* be a problem! )

- Steve Majewski