Re: codecs in a chroot / without fs access

2012-01-10 Thread Miki Tebeka
Another option is to copy the data to the a location under the new chroot and register a new lookup functions (http://docs.python.org/library/codecs.html#codecs.register). This way you can save some memory. -- http://mail.python.org/mailman/listinfo/python-list

Re: codecs in a chroot / without fs access

2012-01-10 Thread K Richard Pixley
On 1/9/12 16:41 , Philipp Hagemeister wrote: I want to forbid my application to access the filesystem. The easiest way seems to be chrooting and droping privileges. However, surprisingly, python loads the codecs from the filesystem on-demand, which makes my program crash: import os os.getuid()

codecs in a chroot / without fs access

2012-01-09 Thread Philipp Hagemeister
I want to forbid my application to access the filesystem. The easiest way seems to be chrooting and droping privileges. However, surprisingly, python loads the codecs from the filesystem on-demand, which makes my program crash: import os os.getuid() 0 os.chroot('/tmp')