Added the new `examples' directory to the distribution.
[bpt/guile.git] / examples / safe / evil.scm
CommitLineData
2de7ddb7
MG
1;;; examples/safe/evil.scm -- Evil Scheme file to be run in a safe
2;;; environment.
3
4;;; Commentary:
5
6;;; This is an example file to be evaluated by the `safe' program in
7;;; this directory. This program, unlike the `untrusted.scm' (which
8;;; is untrusted, but a really nice fellow though), tries to do evil
9;;; things and will thus break in a safe environment.
10;;;
11;;; *Note* that the files in this directory are only suitable for
12;;; demonstration purposes, if you have to implement safe evaluation
13;;; mechanisms in important environments, you will have to do more
14;;; than shown here -- for example disabling input/output operations.
15
16;;; Author: Martin Grabmueller
17;;; Date: 2001-05-30
18
19;;; Code:
20
21(define passwd (open-input-file "/etc/passwd"))
22
23(let lp ((ch (read-char passwd)))
24 (if (not (eof-object? ch))
25 (lp (read-char passwd))))