Artifacts Associated With Ticket 1999119fffffffffffffffffffffffffffffffff
Ticket change [b1f497d7a4] (rid 98254) by nicolascastagne on 2008-06-20 20:32:00:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl Modules (TM, see TIP 189, http://tip.tcl.tk/189) cannot be required from a safe interp. EG: % package require math::bigfloat 2.0.1 % ::safe::interpCreate interp0 % interp eval interp0 "package require math::bigfloat" can't find package math::bigfloat % interp eval interp0 "package require math::linearalgebra" can't find package math::linearalgebra Since is a problem, since many of the important tcllib package are now provided through the TM mechanism. The old versions of those packages are correctly loaded in the safe interp... but they are old versions ! According to Andreas Kupries, on the active tcl mail list: "The code for the 'safe base' was likely not updated to handle searching for TMs... It may also be that the package unknown handler doing the search for TMs is not installed in safe interpreters. I would have to check the init.tcl file doing that part of the setup." Also : "Remember, a big part of the 'package' command, the search for packages, is implemented in Tcl and plugged into the main command via 'package unkown'. The relevant pieces of the core are in 'init.tcl', which sets up the plugging, 'package.tcl' handling the general package mechanism, and 'tm.tcl' for the Tcl Modules." - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nicolascastagne"
- subsystem initialized to: "33. Safe Base"
- title initialized to:
Save base does not handle the new TM module mechanism
- type initialized to: "Bug"
Ticket change [5efe7e3fd0] (rid 115733) by nicolascastagne on 2008-06-21 03:35:27:
- icomment:
Logged In: YES user_id=1258423 Originator: YES See also discussion on comp.lang.tcl http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/3e15e20b001e6ecf
- login: "nicolascastagne"
- mimetype: "text/plain"
- username: "nicolascastagne"
- icomment:
Ticket change [5c019e8e32] (rid 118422) by hobbs on 2008-06-21 04:13:07:
- assignee changed to: "andreas_kupries"
- foundin changed to: "obsolete: 8.5.2"
- icomment:
Logged In: YES user_id=72656 Originator: NO Would need backporting as well.
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "7 High"
- title changed to:
Safe base does not handle the new TM module mechanism
- username: "hobbs"
Ticket change [5afc4992a8] (rid 118238) by dgp on 2008-06-24 21:29:28:
- icomment:
Logged In: YES user_id=80530 Originator: NO I think it would be good to get this fixed for Tcl 8.5.3.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "dgp"
- icomment:
Ticket change [57185dc18c] (rid 94429) by andreas_kupries on 2008-06-24 23:22:14:
- icomment:
Logged In: YES user_id=75003 Originator: NO For when is the release of 8.5.3 planned ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [8c87f4589d] (rid 127757) by andreas_kupries on 2008-06-25 01:17:05:
- icomment:
Logged In: YES user_id=75003 Originator: NO First notes, collected during first investigative sweep. - The tcl::tm::UnknownHandler is not activated for safe interps (init.tcl, line 157ff). - Activation of the tcl::tm::UnknownHandler shows that it uses a series commands deemed unsafe (file normalize, file exists, glob). (**) - The problems with the first two are readily fixed, simply do not use them in a safe interp. Not sure if that is without repercussions, especially with regard to the normalize. - Usage of 'glob' however is essential. In the regular package mechanism not having it only kills the search in subdirectories of the auto_path. We can still directly source pkgIndex.tcl in directories, and catch problems. For Tcl Modules we do not have a fixed name. We have to search, i.e. glob. to fix this the safe base has to be extended with a 'safe glob' command, i.e. a restricted form of glob which can look only at the paths registered with the safe base. Or something like that. (**) Used proc ::log {args} { puts $args } safe::setLogCmd ::log to get debugging information out of the safe base. - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [5b60d9c36e] (rid 118311) by dkf on 2008-06-25 18:36:20:
- icomment:
Logged In: YES user_id=79902 Originator: NO Arguably the locating of the package ought to be done in the master.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [344156194b] (rid 106728) by dgp on 2008-06-25 21:47:46:
- icomment:
Logged In: YES user_id=80530 Originator: NO ok, not the trivial fix I was expecting. Still important, but I won't block 8.5.3 for it.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dgp"
- icomment:
Add attachment "tm-safe-base.patch" [25430e91ff] (rid 88142) by andreas_kupries on 2008-06-25 22:57:34.
Ticket change [00912b816d] (rid 119344) by andreas_kupries on 2008-06-25 22:57:34:
- icomment:
File Added - 282621: tm-safe-base.patch Logged In: YES user_id=75003 Originator: NO Patch attached. File Added: tm-safe-base.patch
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [d780adbe95] (rid 124001) by andreas_kupries on 2008-06-26 00:55:29:
- closedate changed to: "2008-06-25T17:55:29"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Originator: NO Committed to both head and 8.5 branch, test suite updated for the changes (the latter primarily dgp). Regarding 'locating of the package ought to be done in the master', that would have required a larger redesign of the safe base I think. The handling of the virtual to real path translation would change, and each 'package require' by the slave would have to reconfigure the package management in the master if the set of search paths is restricted, i.e. the slave not allowed to see all packages, only some, and/or in some specific corner of the fs just for them. For that having the code doing the locatingi n the slave and configured for the restrictions is much easier than having to switch the master around. IMHO.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"
Ticket change [f20a136247] (rid 109466) by das on 2008-06-26 02:25:17:
- icomment:
Logged In: YES user_id=90580 Originator: NO note that install-libraries in unix/Makefile.in appends a [::tcl::tm::roots] command to tm.tcl when TCL_MODULE_PATH is defined, is that command ok in a safe interp, or should it also have an [if {![interp issafe]}] check around it? - login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment:
Ticket change [39b5dca9dd] (rid 112436) by andreas_kupries on 2008-06-26 09:32:20:
- icomment:
Logged In: YES user_id=75003 Originator: NO Should have a check around it. I forgot about that place.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment: