[racket] Handin Server + PLAI problem

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Jan 14 18:52:18 EST 2012

10 minutes ago, Robby Findler wrote:
> Does variable-reference->module-source use current-directory?
> If so, that'd explain this. (And either it would have to change or
> the handin-server/sandbox would have to.)

It looks like it does -- running the code below shows

   >>> (find-system-path #f (exists))
   >>> (find-system-path #f (exists))

But the security guard that the sandbox installs allows "pathless
queries" where the path is `#f'.  Perhaps it's some code that uses the
resulting path?  (But that would be the path of the module, which
should be allowed, not the current directory.)

This is the code I tried:

  #lang racket
  (define-namespace-anchor a)
  (define ns (namespace-anchor->namespace a))
  (parameterize ([current-security-guard
                   (lambda (what path modes)
                     (eprintf ">>> ~s\n" `(,what ,path ,modes)))
    (eval '(variable-reference->module-source (#%variable-reference))

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.