Skip to content
Tcl Source Code History Of Ticket 849514
Login

History Of Ticket 849514

Artifacts Associated With Ticket 849514

  1. Ticket change [7b83bdfd5b] (rid 96922) by vulpeculus on 2003-11-26 09:07:49:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This concerns Tcl  on Unix (Solaris 8, Solaris 9, RH
      Linux Kernel 2.4.?):
      
      When trying to open a file (e.g. [open $filename r])
      with an absolute pathname containing symbolic links and
      ../ (parent directory), a wrong file is referenced:
      e.g. if  /home/somedir is a link to /root/otherdir then
      trying to open /home/somedir/../file opens /home/file
      instead of /root/file
      
      In Tcl 8.3.1 open worked as expected. The first Tcl
      version which I can test and has the problem is 8.4.1
      
    4. foundin initialized to: "obsolete: 8.4.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vulpeculus"
    9. subsystem initialized to: "36. Pathname Management"
    10. title initialized to: "Absolute pathnames with ../ and links"
    11. type initialized to: "Bug"
  2. Ticket change [dc149dcf69] (rid 108066) by hobbs on 2003-11-27 01:00:11:

    1. closedate changed to: "2003-11-26T18:00:11"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      This works for me in 8.4.5 on linux:
      
      ln -s /tmp/dist /home/
      tclsh
       % open /home/dist/../jeffh/.cshrc
       file4
      
      So this should have been checked against the latest release 
      before submitting.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Out of Date"
    7. status changed to: "Closed"
    8. username: "hobbs"
  3. Ticket change [f424657836] (rid 129855) by vulpeculus on 2003-11-27 14:32:08:

    1. icomment:
      Logged In: YES 
      user_id=917954
      
      The bug IS still ion 8.4.5. What I wanted to say that it
      probably first occured between 8.3.1 and 8.4.1.
      
      In your example /home/dist is a link to /tmp/dist
      So /home/dist/../jeffh/.cshrc is /tmp/jeffh/.cshrc, not
      /home/jeffh/.cshrc (try it e.g. with ls in any shell).
      However, as long as you do not have a file
      /tmp/jeffh/.cshrc, the open command from your example should
      return an error "no such file or directory", instead of
      opening the wrong file.
      
      The same behaviour can also be found with a non-existing
      directory in your pathname:
      open /home/jeffh/nonexistentdir/../.cshrc
      fails in 8.3.1 (correct), but succeeds in 8.4.5 (incorrect)
      
      
    2. login: "vulpeculus"
    3. mimetype: "text/plain"
    4. resolution changed to: "None"
    5. status changed to: "Open"
    6. username: "vulpeculus"
  4. Ticket change [4d95d2fea4] (rid 127079) by vincentdarley on 2003-12-10 19:17:38:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      This behaviour is all down to 'file normalize', so if this
      bug report is correct, you should be able to show that 'file
      normalize' returns the wrong path for some input strings
      containing ../
      
      Can you please try to provide one or two examples?
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  5. Ticket change [0fd09cbb77] (rid 94858) by vincentdarley on 2003-12-10 19:22:57:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Here's a simple example on Windows:
      
      file mkdir tclfoo
      cd tclfoo
      
      file mkdir one/two/three
      file link link one/two/three
      file normalize link/../foo
      
      # The result:
      E:/tclfoo/foo
      # It should be:
      E:/tclfoo/one/two/foo
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. username: "vincentdarley"
  6. Ticket change [f183aafe43] (rid 109373) by vincentdarley on 2003-12-10 19:32:43:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      The bug is quite clear now.  TclFSNormalizeAbsolutePath
      removes all '.' and '..' sequences before passing the path
      to the platform-specific normalization code. But, the '..'
      removal is done in a purely string-based way, with no
      awareness of symlinks at all.
      
      We probably need to remove that whole block of code (lines
      149-173 of tclPathObj.c) and make each platform-specific
      piece of code a bit cleverer.
      
      This might actually improve performance, since it would
      remove the need for a whole file split/file join pair in the
      current approach (but replace it with more complex
      platform-specific code).
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  7. Ticket change [68a9843124] (rid 103108) by vincentdarley on 2003-12-11 00:35:47:

    1. icomment:
      
      
      File Added - 70181: linknorm.diff
      
      Logged In: YES 
      user_id=32170
      
      Please test the attached patch (to Tcl 8.5a0)
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  8. Ticket change [657e36cd48] (rid 102554) by vincentdarley on 2003-12-11 18:53:10:

    1. icomment:
      
      
      File Deleted - 70181: 
      
      
      
      File Added - 70242: linknorm.diff
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  9. Ticket change [ac78285779] (rid 101295) by vincentdarley on 2003-12-11 19:58:19:

    1. assignee changed to: "hobbs"
    2. icomment:
      
      
      File Deleted - 70242: 
      
      
      
      File Added - 70250: linknorm.diff
      
      Logged In: YES 
      user_id=32170
      
      Updated patch.  Needs testing on unix, but should then be
      ready to go.
      
      Jeff: could you test this please?
      
      
      
    3. login: "vincentdarley"
    4. mimetype: "text/plain"
    5. username: "vincentdarley"
  10. Add attachment "linknorm.diff" [b05e439b1d] (rid 97967) by vincentdarley on 2003-12-13 00:30:23.

  11. Ticket change [12849f1aa8] (rid 124044) by vincentdarley on 2003-12-13 00:30:23:

    1. icomment:
      
      
      File Deleted - 70250: 
      
      
      
      File Added - 70363: linknorm.diff
      
      Logged In: YES 
      user_id=32170
      
      Updated patch for cvs head.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  12. Ticket change [7d830e18e6] (rid 97254) by hobbs on 2004-02-06 09:37:31:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      We will also need an 8.4-based patch.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "hobbs"
  13. Ticket change [54bddd6dbc] (rid 93996) by hobbs on 2004-02-18 08:37:35:

    1. closedate changed to: "2004-02-18T01:37:35"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      backported for 8.4.6.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"
  14. Ticket change [3903b79ab9] (rid 112314) by hobbs on 2004-02-18 09:04:21:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      had to revert because the changes were not properly
      isolated, and the 8.5 changes are a lot more spread out than
      expected.  Don't know quite what to backport ...
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "hobbs"
  15. Ticket change [a625163740] (rid 98545) by hobbs on 2004-11-18 00:46:41:

    1. assignee changed to: "vincentdarley"
  16. Ticket change [a4d368402e] (rid 110267) by dgp on 2004-11-18 01:31:12:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      This matter is related to 961646.
      
      Both are rooted in the fact that
      Tcl's Tcl_Filesystem layer is
      imposing one interpretation of
       ".." in a path instead of leaving
      it up to each (native) filesystem
      to use its own preferences.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [48e2790f07] (rid 99967) by dgp on 2004-12-02 08:30:41:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      dropping priority since this
      can't be "fixed" until the
      differences of opinion about
      the correct design of the
      VFS layer laid out in 961646
      are addressed.
      
      this won't be fixed in Tcl 8.4.9.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. username: "dgp"
  18. Ticket change [024b76ed78] (rid 119619) by vincentdarley on 2004-12-03 01:18:26:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      I don't know if I agree with dgp's comment that each
      filesystem should have its own interpretation of '..'. 
      Surely they should be the same?  (At least that's what's in
      Tcl 8.5)
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"