Tcl Source Code

View Ticket
Login
Ticket UUID: 759607
Title: Init of Safe Slave Fails
Type: Bug Version: obsolete: 8.4.3
Submitter: lukekalemyers Created on: 2003-06-24 03:00:57
Subsystem: 33. Safe Base Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-07-17 05:49:44
Resolution: Fixed Closed By: hobbs
    Closed on: 2003-07-16 22:49:44
Description:
Safe slave init fails when given a valid, but
non-normalized, -accessPath:

% ::safe::interpCreate 0 -accessPath \
/opt/ActiveTcl/lib/tcl8.4/
can't source init.tcl into slave 0 (permission denied)

This behavior was exposed when testing tclplugin.
On one otherwise functioning Tcl installation, [info
library] returned a non-normalized path.

Non-normalized paths may not be widespread, but they
sure can cause a lot of grief a long way from the
cause. I think -accessPath should not require
normalized paths or should issue a more informative
error message.

A patch is attached. It changes:

1.) [::safe::FileInAccessPath] to normalize paths
before comparing them.

2.) [::safe::InterpInit] to report the full pathname
when failing to source init.tcl.
User Comments: hobbs added on 2003-07-17 05:49:44:
Logged In: YES 
user_id=72656

Part 1 doesn't look right as it adds an extra [list] around the 
norm'ed path, which I removed.  part 2 will not be applied 
because it potentially exposes local path info to the user, 
no?  That's a security violation.  Part 1 commited for 8.4.4 
and 8.5a.

lukekalemyers added on 2003-06-24 10:00:58:

File Added - 53959: safe.tcl.patch

Attachments: