[Python-Dev] hook for standalone executable
Alex Martelli
aleax at aleax.it
Sat Aug 9 10:33:27 EDT 2003
On Saturday 09 August 2003 07:34, Mark Hammond wrote:
> I'm with Jack to some extent - it seems a little hacky. But the problem
> is real.
Jack's point -- that my half-baked idea about changing behavior depending
on the executable's name is insecure due e.g. to the possibility of links to
a setuid executable -- is perfectly well taken. I'm not sure that there is
a "real need" for such an examination of the executable-name. Thus,
rather than:
> * Make changes to Py_Main() necessary to better support "hard-embedders",
> which may include custom sys.argv/environ processing.
>
> * Propose a new executable that some Python platforms can choose to
> distribute - eg, 'python-package{.exe}'. This is really just identical
> to python.exe, but with the only 'if doesnt start with 'python'' parts of
> your proposal.
it seems to me that giving up on the "only if it doesn't start with python"
specific tidbit. Rather, 'python-package.exe' could be distributed with
the new parts of the code turned on (and perhaps with the parts only
needed for interactive interpretation turned off -- optional, just to save
some space & perhaps enhance security a bit), if that makes life any
easier on some platforms; thus python.exe itself would remain pristine
if desired (presumably all of this new stuff might depend on some kind
of --with... switch to ./configure).
Alex
More information about the Python-Dev
mailing list