[Python-Dev] hook for standalone executable

Jack Jansen Jack.Jansen at cwi.nl
Fri Aug 8 23:21:42 EDT 2003


On vrijdag, aug 8, 2003, at 19:19 Europe/Amsterdam, Thomas Heller wrote:

> This hook could be triggered by examining the filename of the 
> executable
> itself. If the basename starts (case-insensitive) with the
> characters 'python', everything continues as it is now.

I don't think I like this. Having something that looks like a perfectly 
normal
application turn into a Python interpreter by copying it and renaming 
it to
"python", or worse, by making a symlink "python" to it (think setuid 
program here)
is too dangerous.

As you want to hack the dataspace anyway, to provide for setting flags 
and such,
I would suggest also adding a flag Py_StandaloneProgram there. If the 
flag is
false everything is normal. If the flag is true you do the special 
processing,
but without the possibility of fallback to a normal interpreter.
--
- Jack Jansen        <Jack.Jansen at oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -




More information about the Python-Dev mailing list