r53199 - sandbox/branches/setuptools-0.6/setuptools/sandbox.py
Author: phillip.eby Date: Sat Dec 30 04:06:57 2006 New Revision: 53199 Modified: sandbox/branches/setuptools-0.6/setuptools/sandbox.py Log: Fix os.open() sandboxing code that refused anything but read-only access. (backport from trunk) Modified: sandbox/branches/setuptools-0.6/setuptools/sandbox.py ============================================================================== --- sandbox/branches/setuptools-0.6/setuptools/sandbox.py (original) +++ sandbox/branches/setuptools-0.6/setuptools/sandbox.py Sat Dec 30 04:06:57 2006 @@ -189,8 +189,8 @@ def open(self, file, flags, mode=0777): """Called for low-level os.open()""" - if flags & WRITE_FLAGS: - self._violation("open", file, flags, mode) + if flags & WRITE_FLAGS and not self._ok(file): + self._violation("os.open", file, flags, mode) return _os.open(file,flags,mode)
participants (1)
-
phillip.eby