Commit | Line | Data |
---|---|---|
673509f8 MG |
1 | -*- outline -*- |
2 | ||
3 | * Overview | |
2de7ddb7 MG |
4 | |
5 | This directory includes examples which show how to create and use safe | |
6 | environments for safe (sand-boxed) execution of Scheme programs. | |
7 | ||
8 | *Note* that the files in this directory are only suitable for | |
9 | demonstration purposes, if you have to implement safe evaluation | |
10 | mechanisms in important environments, you will have to do more than | |
11 | shown here -- for example disabling input/output operations. | |
12 | ||
13 | The descriptions below assume that you have a working copy of Guile | |
14 | installed and available with the standard installation prefix | |
15 | `/usr/local'. | |
16 | ||
673509f8 MG |
17 | * Included Examples |
18 | ||
19 | ||
20 | ** safe | |
2de7ddb7 MG |
21 | |
22 | The main program, which executes the Scheme code in a file given on | |
23 | the command line in a safe environment. The following command will | |
24 | do that with the file `untrusted.scm' (see below.) | |
25 | ||
26 | $ ./safe untrusted.scm | |
27 | ||
28 | or | |
29 | ||
30 | guile -s safe untrusted.scm | |
31 | ||
673509f8 | 32 | ** untrusted.scm |
2de7ddb7 MG |
33 | |
34 | This file contains some Scheme code, which will be executed in a | |
35 | safe environment by the `safe' script. | |
36 | ||
673509f8 | 37 | ** evil.scm |
2de7ddb7 MG |
38 | |
39 | This file also contains Scheme code, but it tries to do evil things. | |
40 | Evaluating this with the `safe' script will abort on those evil | |
41 | actions. |