Skip to content
Tcl Source Code History Of Ticket 3385749fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3385749fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3385749fffffffffffffffffffffffffffffffff

  1. Ticket change [e27108d1ed] (rid 87627) by sampsonr on 2011-08-03 17:36:31:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      At some points in the TCL C source, as well as in init.tcl, auto.tcl, and autoload.tcl, there are are file open(read) operations that do not check first to see if the file exists.  Instead, they rely on a catch, or reacting to the open calls' return code. 
      
      Granted, this is a fairly common programming practice, but it presents a hassle in environments where the system is subject to high-level auditing (e.g. government systems). In those cases, every single failed file open call results in an audit record being generated. On a system with hundreds of users, this contributes to a management burden for the S/A.
      
      I recommend that each such open attempt be wrapped with a [file exists] or a stat() call in the C. 
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "sampsonr"
    10. subsystem initialized to: "38. Init - Library - Autoload"
    11. title initialized to: "File open failures audited"
    12. type initialized to: "Bug"
  2. Ticket change [e31fed493b] (rid 87739) by hobbs on 2011-08-04 00:47:37:

    1. icomment:
      The lack of 'file exists' (or readable) is actually intentional because some systems have ACLs that have duped 'file readable' in the past, saying not readable, but they were.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  3. Ticket change [e3fc0f475d] (rid 87884) by dkf on 2011-08-04 03:50:29:

    1. icomment:
      There's also a race condition between an access()/stat() call and the open().
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [953025a873] (rid 106118) by twylite on 2011-08-08 00:35:19:

    1. icomment:
      Are you referring to files that are used by Tcl itself, or to operations initiated by software written in Tcl?
      
      In the former case there may be an argument for doing a [file exists] (and accepting the race condition if it is not security sensitive).  
      
      In the latter case an attempt was made to access the file, and if there is system-level auditing this fact _should_ be in the audit log.  If this is happening a lot, the security administrators _should_ be investigating why there are so many attempts to open non-existent files.
      
      
    2. login: "twylite"
    3. mimetype: "text/plain"
    4. username: "twylite"