New issue 2542: Not implemented: sandboxing for external function 'opendir' in
ubuntu 16.04
https://bitbucket.org/pypy/pypy/issues/2542/not-implemented-sandboxing-for-external
Timothy Watts:
In the process of updating my base image from 14.04 to 16.04 I noticed that the
sandbox is not quite working. It works in 14.04. I've been attempting to create
a `do_ll_os__ll_os_opendir` function and things like that but I feel like I'm
poking in the dark.
# ubuntu 16.04
normal pypy
```
[~]>sudo docker run -it ubuntu:16.04 bash
root@934cb20e2062:/# apt-get update; apt-get install pypy pypy.sandbox
<snip the install log out>
root@934cb20e2062:/# pypy <- normal pypy works
Python 2.7.10 (5.1.2+dfsg-1~16.04, Jun 16 2016, 17:37:42)
[PyPy 5.1.2 with GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> import os; os.listdir('/tmp')
[]
KeyboardInterrupt
>>>>
```
pypy.sandbox
```
root@934cb20e2062:/# pypy-sandbox --tmp=/tmp <-- now in pyp-sandbox
'import site' failed
Python 2.7.10 (5.1.2+dfsg-1~16.04, Jun 16 2016, 20:12:38)
[PyPy 5.1.2 with GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> import os; os.listdir('/tmp')
Not implemented: sandboxing for external function 'opendir'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 0] Success: '/tmp'
>>>>
```
# ubuntu 14.04 (works)
```
root@b14167dcdf5b:/# pypy-sandbox --tmp /tmp
'import site' failed
Python 2.7.3 (2.2.1+dfsg-1ubuntu0.3, Sep 30 2015, 17:43:43)
[PyPy 2.2.1 with GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> import os; os.listdir('/tmp')
[]
>>>>
```
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue