How to permanently remove __import__?

Peter Hansen peter at engcorp.com
Wed Jun 18 12:36:39 EDT 2003


martin z wrote:
> 
> > If you do the custom interpreter you might be able to make fewer
> > changes, and be confident of much greater security, than if you
> > try to put all the restrictions in from a higher level.  Just a
> > thought...
> 
> A custom interpreter would be ideal if it weren't for three things:
> first, I've looked at the code for Python's filesystem functions.  They were
> not meant to be human-readable except possibly to Guido himself.  Playing
> with them would be less than fun.  Second, when newer versions of Python
> become available I don't want to have to recode the whole anti-filesystem
> component.  Third: it would just be nicer if I could work within the
> existing Python framework.
> 
> I don't suppose there's a compiler variable for "no filesystem" eh?

Undef Linux I think it's spelled "chroot", isn't it?  :-)




More information about the Python-list mailing list