[racket-dev] sandbox and file-/directory-existence tests

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Aug 19 16:34:30 EDT 2013

I keep running into sandbox trouble due to file- and
directory-existence tests that are buried inside functions that inspect
Racket's configuration. For example, the contract system runs into
trouble because it uses `path->relative-string/library', which has to
find collections, so it needs to look at the installation's
configuration file, which it may have to find relative to the `racket'
executable (and that's just the tip of the iceberg).

Although I can imagine ways to fix the problem that involve trusting
the modules that search for paths, I wonder whether there's any harm in
simply allowing all file- and directory-existence tests.

Is there a situation where allowing an arbitrary file- or
directory-existence test would be bad?


Posted on the dev mailing list.