summaryrefslogtreecommitdiff
path: root/examples/safe/README
blob: be16e1e7451d4927ed50eb7fd7dfcdff43631fee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
							       -*- text -*-

This directory includes examples which show how to create and use safe
environments for safe (sand-boxed) execution of Scheme programs.

*Note* that the files in this directory are only suitable for
 demonstration purposes, if you have to implement safe evaluation
 mechanisms in important environments, you will have to do more than
 shown here -- for example disabling input/output operations.

The descriptions below assume that you have a working copy of Guile
installed and available with the standard installation prefix
`/usr/local'.

safe:

  The main program, which executes the Scheme code in a file given on
  the command line in a safe environment.  The following command will
  do that with the file `untrusted.scm' (see below.)

  $ ./safe untrusted.scm

  or

  guile -s safe untrusted.scm

untrusted.scm:

  This file contains some Scheme code, which will be executed in a
  safe environment by the `safe' script.

evil.scm

  This file also contains Scheme code, but it tries to do evil things.
  Evaluating this with the `safe' script will abort on those evil
  actions.