Tcl Library Source Code

View Ticket
Login
Ticket UUID: 4c3e532500a7ed13862bbcd57de72c2f4c7411
Title: tool::uuid_seed may raise error
Type: Bug Version: trunk
Submitter: pointsman Created on: 2019-02-20 21:37:48
Subsystem: tool Assigned To: hypnotoad
Priority: 5 Medium Severity: Severe
Status: Open Last Modified: 2026-11-15 13:36:40
Resolution: None Closed By: nobody
    Closed on:
Description:
Look at:

http://core.tcl.tk/tcllib/artifact?udc=1&ln=114-116&name=066c2163260e8391

Line 115 uses $::env(user) without checking if that exists and will raise error if it doesn't.

If this code is evaluated on a box without USERNAME nor USER nor user in env it will raise error.

I run into this in a docker container.

And even more: All this lines http://core.tcl.tk/tcllib/artifact?udc=1&ln=110-116&name=066c2163260e8391 are useless. They set the variable "user", but this variable isn't used at all.
User Comments: serhiy.storchaka added on 2026-11-15 13:36:40:

Proposed fix in branch tool-uuid-seed-no-user: as pointed out in the ticket, the user name lookup is useless because its value is never used, so it is removed. Test tool-uuid-seed-noenv.


aku added on 2019-03-02 05:02:16:
Handed to author, Sean Woods.