2001-11-08 Vince Darley <vincentdarley@sourceforge.net>
- * generic/vfs.c: made code thread-safe.
+ * generic/vfs.c: made code thread-safe. Disallow
+ safe interpreters from using vfs code since they can then
+ mess with the filesystem across all interpreters.
2001-11-07 Vince Darley <vincentdarley@sourceforge.net>
* generic/vfs.c: all mount information is now stored in a
if (Tcl_PkgRequire(interp, "Tcl", "8.4", 0) == NULL) {
return TCL_ERROR;
}
+ /*
+ * Safe interpreters are not allowed to modify the filesystem!
+ * (Since those modifications will affect other interpreters).
+ */
+ if (Tcl_IsSafe(interp)) {
+ return TCL_ERROR;
+ }
if (Tcl_PkgProvide(interp, "vfs", "1.0") == TCL_ERROR) {
return TCL_ERROR;
}