Re: [Python-Dev] Some news from my sandbox project

2010-09-19 Thread Greg Ewing
Victor Stinner wrote: By "program" you mean a "process"? No, I mean whatever *you* meant by "program" when you said that different programs could otherwise interfere with each other. If you have conceptually separate programs running in the same interpreter that need to be isolated, each one s

Re: [Python-Dev] Some news from my sandbox project

2010-09-19 Thread Antoine Pitrou
On Sun, 19 Sep 2010 12:19:44 +0200 Victor Stinner wrote: > Le dimanche 19 septembre 2010 01:05:45, Greg Ewing a écrit : > > I don't follow. Trusted functions such as proxy() shouldn't > > be sharing a __builtins__ dict with sandboxed code. > > (...) > > So give each program its own copy of __built

Re: [Python-Dev] Some news from my sandbox project

2010-09-19 Thread Victor Stinner
Le dimanche 19 septembre 2010 01:05:45, Greg Ewing a écrit : > I don't follow. Trusted functions such as proxy() shouldn't > be sharing a __builtins__ dict with sandboxed code. > (...) > So give each program its own copy of __builtins__. By "program" you mean a "process"? proxy() and untrusted fun

Re: [Python-Dev] Some news from my sandbox project

2010-09-18 Thread Greg Ewing
Victor Stinner wrote: Eg. one of the most important function of pysandbox is proxy() (a function to create a read only view of a object outside the sandbox, especially on an import), if you replace isinstance() by a function which always return True: you can get unmodified objects I don't f

Re: [Python-Dev] Some news from my sandbox project

2010-09-18 Thread Greg Ewing
Robert Collins wrote: __builtins__ is in everyone's global namespace, so if it can be mutated, different python programs running in the same sandbox can affect each other. So give each program its own copy of __builtins__. -- Greg ___ Python-Dev mai

Re: [Python-Dev] Some news from my sandbox project

2010-09-18 Thread Victor Stinner
Le samedi 18 septembre 2010 10:39:58, Robert Collins a écrit : > __builtins__ is in everyone's global namespace, so if it can be > mutated, different python programs running in the same sandbox can > affect each other. > > Ditto sys.modules and os environ, but I guess that those are already > addr

Re: [Python-Dev] Some news from my sandbox project

2010-09-18 Thread Victor Stinner
Le samedi 18 septembre 2010 10:24:49, Greg Ewing a écrit : > Victor Stinner wrote: > > I'm still developing irregulary my sandbox project since last june. > > > > Today, the biggest problem is the creation of a read only view of the > > __builtins__ dictionary. > > Why do you think you need to do

Re: [Python-Dev] Some news from my sandbox project

2010-09-18 Thread Robert Collins
On Sat, Sep 18, 2010 at 8:24 PM, Greg Ewing wrote: > Victor Stinner wrote: > >> I'm still developing irregulary my sandbox project since last june. > >> Today, the biggest problem is the creation of a read only view of the >> __builtins__ dictionary. > > Why do you think you need to do this? What

Re: [Python-Dev] Some news from my sandbox project

2010-09-18 Thread Greg Ewing
Victor Stinner wrote: I'm still developing irregulary my sandbox project since last june. Today, the biggest problem is the creation of a read only view of the __builtins__ dictionary. Why do you think you need to do this? What form of attack would a writable __builtins__ expose you to that

[Python-Dev] Some news from my sandbox project

2010-09-17 Thread Victor Stinner
Hi, I'm still developing irregulary my sandbox project since last june. pysandbox is a sandbox to execute untrusted Python code. It is able to execute unmodified Python code with a low overhead. I consider it as stable and secure. http://github.com/haypo/pysandbox/ Today, the biggest problem is