1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
guile/examples/safe/evil.scm
Martin Grabmüller 673509f84f * scripts/README, scripts/hello.scm, safe/untrusted.scm,
safe/evil.scm, safe/README, modules/README, modules/main,
	modules/module-0.scm, modules/module-1.scm, modules/module-2.scm:
	Minor cleanup.

	* README: Added intro stuff, restructured a bit.

	* box-dynamic/README, box-module/README, box/README: Cleanup and
	restructuring.

	* box-dynamic-module/box-mixed.scm: New file, demonstrating usage
	of extension library functionality, but without exporting
	procedures from the library.

	Thanks to Thomas Wawrzinek for the idea and example code!

	* box-dynamic-module/box-module.scm: Add comments, export
	make-box, box-ref, box-set!.

	* box-dynamic-module/README: Integrate new module (box-mixed),
	restructure and cleanup a bit.
2001-06-14 20:36:06 +00:00

27 lines
864 B
Scheme

;;; examples/safe/evil.scm -- Evil Scheme file to be run in a safe
;;; environment.
;;; Commentary:
;;; This is an example file to be evaluated by the `safe' program in
;;; this directory. This program, unlike the `untrusted.scm' (which
;;; is untrusted, but a really nice fellow though), tries to do evil
;;; things and will thus break in a safe environment.
;;;
;;; *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.
;;; Author: Martin Grabmueller
;;; Date: 2001-05-30
;;; Code:
(define passwd (open-input-file "/etc/passwd"))
(let lp ((ch (read-char passwd)))
(if (not (eof-object? ch))
(lp (read-char passwd))))
;;; End of file.