[plt-scheme] Re: Using planet packages with the Handin server?

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Apr 22 19:18:10 EDT 2009

On Apr 22, John Clements wrote:
> My interpretation of this is that the sandbox *is* allowing access
> to the directory where the planet files live, but that trying to
> load the planet code also requires access to a number of other
> directories; that, to put it differently, the set of files loaded by
> the require statement is not the same as the set of directories that
> must be readable in order for planet to work correctly.
> Is this correct?

That sounds right.  The thing is that the sandbox code does some
guessing of the paths that are needed, but it's not dealing with
planet paths.  Even if you allow reading all the paths that are
needed, you still need to:

* allow writing to several places for planet to save stuff,

* arrange a code inspector that will allow it to compile files,

* somehow make it so no sandbox steps over another sandbox's file, for
  example, it's probably not a good idea to let several sandboxes
  copile the same files,

* allow a network connection.

The alternative would be to make sure that the files are already in,
that planet will not try to use the network or compile or write into
any file.  This might be doable, but I don't know the details.

Perhaps you can get this in an easier way by requiring the planet
module from your own code, and use the namespace argument to share the
planet module's instance with the sanbox?

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

Posted on the users mailing list.