Commit Graph

68 Commits

Author SHA1 Message Date
Eli Barzilay
75ece5c330 Minor sandbox improvements.
* Check `sandbox-path-permissions' for bad values such as
  '(<perm> <path1> <path2>) where <path2> would get silently ignored.

* Try to clarify the intent of `call-in-sandbox-context' as a meta tool
  rather than a safe execution tool.
2013-03-05 02:22:06 -05:00
Asumu Takikawa
4041e3c841 Fix sandbox doc example 2012-12-30 01:55:44 -05:00
Matthew Flatt
ef525233a2 references: link "A parameter that..." to the definition of "parameter" 2012-08-22 10:28:56 -06:00
Matthew Flatt
d6774d5d54 racket/sandbox: add sandbox-propagate-exceptions 2012-05-25 18:37:29 -06:00
Matthew Flatt
5630a3a1ca racket/sandbox: use `gui-available?' at sandbox creation
Previously, sandbox creation used `gui?', which is the result of
`gui-available?' at the time that `racket/sandbox' is instanited.
This change makes sandbox behavior less sensitive tothe order in
which modules `require'd into a program are intiantiated.

The change depends on a new `sandbox-make-namespace' default
function for `sandbox-namespace-specs'. The new function uses
either  `make-base-namespace' or `make-gui-namespace', depending
on whether the GUI library is available at that point.

A new `sandbox-gui-enabled' parameter can disable use of the
GUI library even if it is available.

The `gui?' binding is still exported for backward compatibility,
but it shouldn't be used anymore.
2012-03-02 07:47:16 -07:00
David Van Horn
f029117266 Fixes spelling errors in reference. 2012-02-21 14:21:43 -05:00
Matthew Flatt
eb0cbcb3c4 sort out for-require' vs. for-load' paths to a sandbox evaluator
The two became tangled in commit f7c16fc8, and then 952ae06105
adjusted the tangling in a way that broke code. This commit
further adjusts tangling in a way that hopefully causes fewer
compatibility problems, but it also splits inputs to
`make-evaluator' so that a programmer can choose more explicitly.
2012-01-19 13:14:02 -07:00
Eli Barzilay
90f7a98dd6 Fix the default `sandbox-make-code-inspector'.
It now creates an inspector based on the original code inspector instead
of the (implicit) wrong default used by `make-inspector'.  Change
`sandbox-make-inspector' too, to make it explicit.
2011-11-02 17:40:24 -04:00
Eli Barzilay
a0baee8ab9 Sandbox fixes
* When `accept-lang?' is #t turn the reader flag on, but otherwise don't
  change it
* turn on the `read-accept-reader' flag which is needed after all
* two refactoring typos
* some more reformatting
2011-08-20 16:14:01 -04:00
Eli Barzilay
da3c6c9be2 Set read-accept-lang' to #t when reading a module in make-module-evaluator'.
Also, some reformatting including uses of `define'.
2011-08-20 06:12:55 -04:00
Eli Barzilay
b644e335d9 Fix the docs for `call-in-sandbox-context'.
Closes PR 12081.
2011-07-30 09:33:24 -04:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Matthew Flatt
0b496d5275 a round of doc corrections from Gwyth 2011-03-10 06:34:33 -06:00
Eli Barzilay
afa8e6c86b Add `get-user-custodian' to the sandbox. 2010-11-16 14:47:01 -05:00
Eli Barzilay
40ecda1a77 Sandboxes make up and remember a reasonable default source to filter
uncovered expressions on.

(See http://lists.racket-lang.org/users/archive/2010-October/042008.html
for a detailed description.)
2010-10-11 15:07:28 -04:00
Matthew Flatt
737b6fac01 rackety reference; any lingering reference to racket as scheme is a doc bug 2010-04-27 08:20:16 -06:00
Matthew Flatt
dbc4ea6e82 racketify reference more 2010-04-26 14:42:33 -06:00
Matthew Flatt
c7e723eef7 somewhat rackety core docs 2010-04-22 15:10:25 -06:00
John Clements
11c87c75e1 minor typo fix an/and
svn: r17866
2010-01-28 18:09:52 +00:00
Jon Rafkind
9f10bc960b typo
svn: r16011
2009-09-14 21:13:22 +00:00
Eli Barzilay
cb78ec3bf6 a bunch of typos
svn: r15823
2009-08-28 04:06:14 +00:00
Eli Barzilay
4288c6c2c7 The Scribble reader was improved to make it pull out the syntax
punctuations outside of the form, as it does with quote punctuations.
So things like this

  #, @foo{...}

that required the space to make the @foo read as a scribble form are
now better written as

  @#,foo{...}

This changes all such occurrences.  (In case you see this change in
your files and are worried that there might be changes: I mechanically
verified that the result of `read'ing the modified files is identical
to the previous version.)

svn: r15111
2009-06-07 10:12:32 +00:00
Eli Barzilay
ff73a5395e removed lots of "the the"s
svn: r14679
2009-05-01 21:02:51 +00:00
Matthew Flatt
5514afa4bc notes on the hazards of sandbox break propagation
svn: r14220
2009-03-22 16:42:03 +00:00
Matthew Flatt
9927b0b576 changed htdp languages to allow identifier module paths; scribble improvements to latex back-end; added definterface
svn: r13681
2009-02-16 22:04:51 +00:00
Eli Barzilay
bd561ab191 some paren typos
svn: r13416
2009-02-04 16:28:14 +00:00
Eli Barzilay
c2d5c44a7f use make-evaluator in network example; describe common use for testing; describe nested call restriction
svn: r13343
2009-01-31 20:49:40 +00:00
Eli Barzilay
4e6039bedd typo
svn: r13259
2009-01-22 18:53:14 +00:00
Eli Barzilay
5cb1e91764 typo
svn: r12897
2008-12-19 04:26:19 +00:00
Eli Barzilay
7d48a62155 documented recent changes
svn: r12896
2008-12-19 02:38:55 +00:00
Eli Barzilay
f74dc2b8c7 Added `call-with-trusted-sandbox-configuration', and used in scribble
and in tests.

svn: r12871
2008-12-16 20:29:17 +00:00
Eli Barzilay
e5027cb7b0 added a clarifying example for how limits interact
svn: r12864
2008-12-15 22:15:52 +00:00
Eli Barzilay
b0758de6f1 clarification on the (new) way memory is charged
svn: r12856
2008-12-15 18:22:58 +00:00
Eli Barzilay
ab115fb6e4 default global limit is 30mb
svn: r12852
2008-12-15 16:26:25 +00:00
Eli Barzilay
b882de2409 allow any number for memory limits
svn: r12851
2008-12-15 16:22:41 +00:00
Eli Barzilay
c62595772f Finally enabled using a sub code-inspector properly, with a new
'read-bytecode permission mode.  Added tests and (crappily)
documented.

svn: r12846
2008-12-15 01:07:00 +00:00
Eli Barzilay
188489b34f * Added `exn:fail:sandbox-terminated' for all sandbox termination
kinds.
* The default exit handler kills the sandbox, with an appropriate
  termination message.
* Also, sending an eof to the sandbox shows 'eof as the reason
* Added some tests for these.
* Still need to deal with termination messages for evaluator suicide.

svn: r12837
2008-12-13 22:12:16 +00:00
Eli Barzilay
bdf71f1b46 typo
svn: r12836
2008-12-13 21:13:03 +00:00
Eli Barzilay
510d9f081f some clarifications
svn: r12835
2008-12-13 19:09:54 +00:00
Eli Barzilay
46e16fc206 * The sandbox now uses a new code-inspector to avoid using protected
bindings
* Added `sandbox-make-code-inspector' to control this
* Changed the function form of `sandbox-security-guard' to be a thunk,
  to make it uniform with other sandbox settings.

svn: r12831
2008-12-13 17:17:12 +00:00
Eli Barzilay
e2221c800b * sandbox-security-guard can now be a function that translates a given
security guard to a new one
* this is now used for the default to avoid grabbing the global
  security guard

svn: r12828
2008-12-13 14:11:28 +00:00
Eli Barzilay
a1222d66ca * Implementer global sandbox memory limit and added
`sandbox-memory-limit' to set it
* Added `evaluator-alive?'
* Undo accidental commenting of most tests

svn: r12786
2008-12-12 12:45:08 +00:00
Eli Barzilay
bf8b409174 removed some bogus text
svn: r12674
2008-12-02 14:36:42 +00:00
Eli Barzilay
e0917e1a5e * Added `call-in-sandbox-context'.
* Removed `get-namespace' since it's generalized in the above.
* Deal with killing the current thread (or the current custodian) in
  the sandbox code.  (Works only without per-expression limits --
  still need to find a solution for `call-with-limits'.)
* Added tests for this.

svn: r12670
2008-12-02 05:26:45 +00:00
Eli Barzilay
ab817097b4 * Create string/bytes output port in the user's custodian (at least
try to do so...).
* Add tests for output collection under resources -- some are
  commented since they're not working right, either a bug in this code
  that I don't see, or some problem with memory accounting.
* Clarify in the docs that output collection is still under resource
  limits.

svn: r12667
2008-12-01 22:19:58 +00:00
Eli Barzilay
8905cc86e5 Added `sandbox-exit-handler' to control the exit handler
svn: r12654
2008-11-30 21:44:47 +00:00
Eli Barzilay
8009a73622 added get-namespace
svn: r12364
2008-11-09 07:35:49 +00:00
Eli Barzilay
1e3517d904 clarify errors when creating the sandbox
svn: r12362
2008-11-09 05:21:30 +00:00
Eli Barzilay
5c2e2c25c5 argument typo
svn: r12359
2008-11-09 01:59:00 +00:00
Eli Barzilay
d90bf83f8c fix output contract (see PR9845)
svn: r12069
2008-10-20 03:28:01 +00:00