evil.scm 864 B

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