Creating a setuid script
Alex
cut_me_out at hotmail.com
Fri Jul 21 15:47:06 EDT 2000
> I am busy writing some scripts, which should be setuid root
When I needed to do this, someone told me that scripts don't run setuid,
as a security feature. The problem is, you can really mess a things up
by passing it corrupted environment variables. So you have to have a C
wrapper program, protects the script by passing it sanitized environment
variables. There is one distributed with the python source. You can
get it here:
http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/python/dist/
src/Misc/setuid-prog.c?rev=1.5&content-type=text/
x-cvsweb-markup&cvsroot=python
(Sorry, you'll have to join the three lines together.)
Alex.
More information about the Python-list
mailing list