From eb72a0dd9391c49e8dfe8ecf17943446051f5543 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 15 Sep 2007 07:09:06 +0000 Subject: [PATCH] do not trust require spec from user code svn: r7343 --- collects/tests/mzscheme/sandbox.ss | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/collects/tests/mzscheme/sandbox.ss b/collects/tests/mzscheme/sandbox.ss index a8b5398616..3b1dc8626c 100644 --- a/collects/tests/mzscheme/sandbox.ss +++ b/collects/tests/mzscheme/sandbox.ss @@ -245,13 +245,14 @@ (directory-list "/tmp") =err> "file access denied" --top-- ;; should work also for module evaluators - (set! ev (make-evaluator `(module foo mzscheme - (require (file ,test-lib))))) - --eval-- - x => 123 - (length (with-input-from-file ,test-lib read)) => 5 - ;; the directory is still not kosher - (directory-list "/tmp") =err> "file access denied" + ;; --> NO! Shouldn't make user code require whatever it wants + ;; (set! ev (make-evaluator `(module foo mzscheme + ;; (require (file ,test-lib))))) + ;; --eval-- + ;; x => 123 + ;; (length (with-input-from-file ,test-lib read)) => 5 + ;; ;; the directory is still not kosher + ;; (directory-list "/tmp") =err> "file access denied" --top-- ;; explicitly allow access to /tmp (set! ev (let ([rx (if (eq? 'windows (system-type))