From 4166a0cfe7deee36e5ff4d23088a43442a2d8d45 Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Sat, 29 May 2010 18:46:01 -0400 Subject: [PATCH] Moved unstable/cce/sandbox to unstable/sandbox. --- collects/unstable/cce/reference/eval.ss | 2 +- collects/unstable/cce/reference/manual.scrbl | 1 - .../unstable/cce/reference/scribble.scrbl | 2 +- collects/unstable/cce/scribble.ss | 2 +- collects/unstable/cce/test/test-main.ss | 2 -- collects/unstable/cce/test/test-sandbox.ss | 9 --------- .../unstable/{cce/sandbox.ss => sandbox.rkt} | 15 ++------------- .../reference => scribblings}/sandbox.scrbl | 19 +++++++------------ collects/unstable/scribblings/unstable.scrbl | 1 + 9 files changed, 13 insertions(+), 40 deletions(-) delete mode 100644 collects/unstable/cce/test/test-sandbox.ss rename collects/unstable/{cce/sandbox.ss => sandbox.rkt} (74%) rename collects/unstable/{cce/reference => scribblings}/sandbox.scrbl (82%) diff --git a/collects/unstable/cce/reference/eval.ss b/collects/unstable/cce/reference/eval.ss index 437e8452fd..f1799f2b9a 100644 --- a/collects/unstable/cce/reference/eval.ss +++ b/collects/unstable/cce/reference/eval.ss @@ -1,6 +1,6 @@ #lang scheme -(require scheme/sandbox unstable/syntax "../sandbox.ss") +(require scheme/sandbox unstable/syntax unstable/sandbox) (define (evaluator . require-specs) (let* ([ev (make-scribble-evaluator 'scheme)]) diff --git a/collects/unstable/cce/reference/manual.scrbl b/collects/unstable/cce/reference/manual.scrbl index c48213fb17..17852c1d9e 100644 --- a/collects/unstable/cce/reference/manual.scrbl +++ b/collects/unstable/cce/reference/manual.scrbl @@ -27,7 +27,6 @@ @include-section["debug.scrbl"] -@include-section["sandbox.scrbl"] @include-section["scribble.scrbl"] @include-section["gui.scrbl"] diff --git a/collects/unstable/cce/reference/scribble.scrbl b/collects/unstable/cce/reference/scribble.scrbl index ed17c6d717..d0ab93ff19 100644 --- a/collects/unstable/cce/reference/scribble.scrbl +++ b/collects/unstable/cce/reference/scribble.scrbl @@ -15,7 +15,7 @@ provides @scheme[this-package-version-symbol] from @schememodname[unstable/cce/planet], @scheme[this-package-in] from @schememodname[unstable/cce/require-provide], and @scheme[make-scribble-evaluator] and @scheme[make-scribble-module-evaluator] -from @schememodname[unstable/cce/sandbox]. +from @schememodname[unstable/sandbox]. @defform*[[ (defmodule/this-package) diff --git a/collects/unstable/cce/scribble.ss b/collects/unstable/cce/scribble.ss index 330c98fc88..5fde07b120 100644 --- a/collects/unstable/cce/scribble.ss +++ b/collects/unstable/cce/scribble.ss @@ -1,6 +1,6 @@ #lang scheme/base -(require scribble/manual "sandbox.ss" "planet.ss" +(require scribble/manual unstable/sandbox "planet.ss" (for-syntax scheme/base "syntax.ss")) (define-for-syntax (make-planet-paths stx ids) diff --git a/collects/unstable/cce/test/test-main.ss b/collects/unstable/cce/test/test-main.ss index 72eb16461f..fca3f7b9a2 100644 --- a/collects/unstable/cce/test/test-main.ss +++ b/collects/unstable/cce/test/test-main.ss @@ -9,7 +9,6 @@ "test-planet.ss" "test-port.ss" "test-require-provide.ss" - "test-sandbox.ss" "test-scribble.ss" "test-set.ss" "test-syntax.ss") @@ -24,7 +23,6 @@ planet-suite port-suite require-provide-suite - sandbox-suite scribble-suite set-suite syntax-suite)) diff --git a/collects/unstable/cce/test/test-sandbox.ss b/collects/unstable/cce/test/test-sandbox.ss deleted file mode 100644 index 646193692b..0000000000 --- a/collects/unstable/cce/test/test-sandbox.ss +++ /dev/null @@ -1,9 +0,0 @@ -#lang scheme - -(require "checks.ss" - "../sandbox.ss") - -(provide sandbox-suite) - -(define sandbox-suite - (test-suite "sandbox.ss")) diff --git a/collects/unstable/cce/sandbox.ss b/collects/unstable/sandbox.rkt similarity index 74% rename from collects/unstable/cce/sandbox.ss rename to collects/unstable/sandbox.rkt index 27f51aee98..76f7a4259a 100644 --- a/collects/unstable/cce/sandbox.ss +++ b/collects/unstable/sandbox.rkt @@ -1,7 +1,6 @@ -#lang scheme +#lang racket -(require scheme/sandbox - "define.ss") +(require racket/sandbox) (provide make-trusted-evaluator make-trusted-module-evaluator @@ -9,16 +8,6 @@ make-scribble-module-evaluator make-sandbox-namespace-specs) -;; Needed for legacy versions of scheme/sandbox -(define-if-unbound (call-with-trusted-sandbox-configuration thunk) - (parameterize ([sandbox-propagate-breaks #t] - [sandbox-override-collection-paths '()] - [sandbox-security-guard (current-security-guard)] - [sandbox-make-inspector current-inspector] - [sandbox-make-logger current-logger] - [sandbox-eval-limits #f]) - (thunk))) - (define make-trusted-evaluator (make-keyword-procedure (lambda (keys vals . args) diff --git a/collects/unstable/cce/reference/sandbox.scrbl b/collects/unstable/scribblings/sandbox.scrbl similarity index 82% rename from collects/unstable/cce/reference/sandbox.scrbl rename to collects/unstable/scribblings/sandbox.scrbl index d1da7639a6..9d6471df2d 100644 --- a/collects/unstable/cce/reference/sandbox.scrbl +++ b/collects/unstable/scribblings/sandbox.scrbl @@ -1,13 +1,10 @@ -#lang scribble/doc -@(require scribble/manual - scribble/eval - "../scribble.ss" - "eval.ss") -@(require (for-label scheme scheme/sandbox unstable/cce/sandbox)) +#lang scribble/manual +@(require scribble/eval "utils.rkt" + (for-label racket racket/sandbox unstable/sandbox)) -@title[#:style 'quiet #:tag "cce-sandbox"]{Sandboxed Evaluation} +@title{Sandboxed Evaluation} -@defmodule[unstable/cce/sandbox] +@defmodule[unstable/sandbox] This module provides tools for sandboxed evaluation. @@ -28,9 +25,7 @@ This module provides tools for sandboxed evaluation. )]{ These procedures wrap calls to @scheme[make-evaluator] and @scheme[make-module-evaluator], respectively, with -@scheme[call-with-trusted-sandbox-configuration] (introduced in PLT 4.1.3.6). -In older versions of PLT Scheme, they simulate the trusted configuration as -closely as possible. +@scheme[call-with-trusted-sandbox-configuration]. } @deftogether[( @@ -63,4 +58,4 @@ This function produces a value for the parameter namespace constructed by @scheme[make-ns] and share a set of instances of the modules referred to by the given @scheme[path]s. -} \ No newline at end of file +} diff --git a/collects/unstable/scribblings/unstable.scrbl b/collects/unstable/scribblings/unstable.scrbl index 5a60ce2f69..0a4630be16 100644 --- a/collects/unstable/scribblings/unstable.scrbl +++ b/collects/unstable/scribblings/unstable.scrbl @@ -83,6 +83,7 @@ Keep documentation and tests up to date. @include-section["pretty.scrbl"] @include-section["queue.scrbl"] @include-section["regexp.scrbl"] +@include-section["sandbox.scrbl"] @include-section["srcloc.scrbl"] @include-section["string.scrbl"] @include-section["struct.scrbl"]