Skip to content
Tcl Source Code View Ticket
Login

View Ticket

irrelevant pkgIndex.tcl permissions impact app startup

Closed / Duplicate217824ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:44:23
OriginalBugID: 1494 Bug
Version: 8.0.5
SubmitDate: '1999-03-12'
LastModified: '1999-08-14'
Severity: CRIT
Status: Closed
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 1497
OS: Solaris
OSVersion: 2.6
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '1999-08-14'


Name:
Larry W. Virden

Extensions:
mclistbox

CustomShell:
none

ReproducibleScript:
    This morning I was working on installing a version of a new package.
    I am struggling to get pkg_mkIndex to work.  I then got a call from a
    user
    indicating that their application - which never uses the new package -
    began getting error msgs instead of running.  My default umask had set
    the 'others' permissions on the new (and as of yet unused) package to
    rwxr-x---
    and that apparently was enough to cause havok.
    



ObservedBehavior:
    error reading package index file
     couldn't read file
    "/usr/tcl80/lib/mclistbox1.0/pkgIndex.tcl:": permission denied
    



DesiredBehavior:
    If a person does a 
    package require Iwidgets
    I would not expect that permissions on a pkgIndex.tcl in some unrelated
    package would cause a problem.  At the very least, the default could be
    not to report
    errors when unable to read the pkgIndex.tcl file.
    
    





    I suspect that this problem occurs because of the brute force approach

    to

    package loading.  It's unfortunate though that the result is that by the

    addition of one unused package one can hose up applications that have

    been running fine for months.


03/12/1999 14:29 - pat - Patch from Don Porter:


Date: Fri, 12 Mar 1999 12:14:11 -0800 (PST)

To: [email protected]

Cc: [email protected]

Subject: [Bug Tcl 8.0.5] irrelevant pkgIndex.tcl permissions impact app startup

From: [email protected]


Tcl 8.0.5 Bug


Name:  Don Porter

email:  [email protected]

Support:  None

Severity:  3

CVS:  init.tcl,v 1.26 1999/02/11

Synopsis:  irrelevant pkgIndex.tcl permissions impact app startup


ObservedBehavior:

    See Larry Virden's previous bug report:

    <URL: http://www.dejanews.com/thread/454229703>.


    NB: If the Scriptics bug database were publicly

    browsable, I'd give the Bug ID.


Patch:

Index: init.tcl

===================================================================

RCS file: /cvsroot/tcl/library/init.tcl,v

retrieving revision 1.26

diff -c -r1.26 init.tcl

*** init.tcl    1999/02/11 03:04:46     1.26

--- init.tcl    1999/03/12 19:31:30

***************

*** 1505,1512 ****

            foreach file [glob -nocomplain [file join [lindex $auto_path $i] \

                    * pkgIndex.tcl]] {

                set dir [file dirname $file]

!               if {[catch {source $file} msg]} {

!                   tclLog "error reading package index file $file: $msg"

                }

            }

          }

--- 1505,1514 ----

            foreach file [glob -nocomplain [file join [lindex $auto_path $i] \

                    * pkgIndex.tcl]] {

                set dir [file dirname $file]

!               if {[file readable $file]} {

!                   if {[catch {source $file} msg]} {

!                       tclLog "error reading package index file $file: $msg"

!                   }

                }

            }

          }


PatchFiles:

    init.tcl


Comments:

    The same bug is present in the Tcl 8.1 CVS sources, in the file

    library/package.tcl .  I'm submitting only one patch.


Posted To comp.lang.tcl: Posted Successfully
welch Closed ticket [217824ffff]. [History diff]2000-10-26 07:49:20
dgp Ticket [217824ffff]: 3 changes [History diff]2001-04-13 23:14:14
Log in (anonymous is fine) to add a comment.