[racket] Sandbox needs to access preferences? Why?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Mar 13 16:48:29 EDT 2012

Do you get a stacktrace with the error?


On Tue, Mar 13, 2012 at 3:06 PM, Jordan Johnson <jmj at fellowhuman.com> wrote:
> Hi all,
> I'm trying to write a checker script for the handin server (which is running on my Mac), and when i try handing an assignment in to it, I am getting the error that read access to my preferences file is denied:
>  ERROR: file-or-directory-modify-seconds: 'read' access denied for
>    /Users/myusername/Library/Preferences/org.racket-lang.prefs.rktd
> In the checker I am creating two evaluators, one using make-evaluator/submission and the other using make-module-evaluator.  I have determined that this definition is provoking the error:
> ;;
> (define-values (asg-eval solution-eval)
>          (parameterize ([sandbox-namespace-specs
>                           (list make-base-namespace 'hw/solutions)])
>            (values
>             (make-evaluator/submission
>              '(special intermediate)
>              '()
>              submission)
>             (make-module-evaluator (build-path asg-dir "solution.rkt")))))
> ;;
> submission is bound by the handin server's check: macro, and asg-dir is defined thus:
> (define asg-dir (build-path server-dir "my-handin-directory-here"))
> where server-dir is also provided by the handin server.  solution.rkt is a file I have written in ISL, which depends only on 2htdp/image and a library I've linked as hw/solutions.
> Can you identify what may be triggering the attempt to read preferences, and how I can either avoid it or grant appropriate read permissions?  Thanks...
> Best,
> Jordan
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Posted on the users mailing list.