1 ;;; examples/safe/evil.scm -- Evil Scheme file to be run in a safe
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.
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.
16 ;;; Author: Martin Grabmueller
21 (define passwd (open-input-file "/etc/passwd"))
23 (let lp ((ch (read-char passwd)))
24 (if (not (eof-object? ch))
25 (lp (read-char passwd))))