Author: Stefano Rivera <stef...@rivera.za.net>
Branch: 
Changeset: r82996:a80669896291
Date: 2016-03-12 09:37 -0800
http://bitbucket.org/pypy/pypy/changeset/a80669896291/

Log:    Support unlink() in the sandbox VFS

        Now that pyc files aren't disableable, we try to unlink() one during
        startup. EPERM is handled correctly, but runtime errors are
        unexpected. So, let's just reject all unlink()s.

diff --git a/rpython/translator/sandbox/sandlib.py 
b/rpython/translator/sandbox/sandlib.py
--- a/rpython/translator/sandbox/sandlib.py
+++ b/rpython/translator/sandbox/sandlib.py
@@ -527,6 +527,9 @@
         node = self.get_node(vpathname)
         return node.keys()
 
+    def do_ll_os__ll_os_unlink(self, vpathname):
+        raise OSError(errno.EPERM, "write access denied")
+
     def do_ll_os__ll_os_getuid(self):
         return UID
     do_ll_os__ll_os_geteuid = do_ll_os__ll_os_getuid
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to