Artifacts Associated With Ticket 453512ffffffffff
Ticket change [5c0deec70c] (rid 118432) by nobody on 2001-08-20 21:31:28:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
$ uname -a Linux redhat 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown $ /usr/local/bin/g++ --version 2.95.3 vendor - redhat 7.1 When I compile /usr/local/bin/g++ -g -o myexecutable main.o -L. -L/usr/X11R6/lib -L/usr/local/lib -ltcl8.3 -ltk8.3 -lX11 -lXext I get the following warning /usr/local/lib/libtcl8.3.a(tclUnixPipe.o): In function `TclpCreateTempFile': tclUnixPipe.o(.text+0xb4): the use of `tmpnam' is dangerous, better use `mkstemp'
- foundin initialized to: "obsolete: 8.3.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "50. Embedding Support"
- title initialized to: "tmpnam() is dangerous"
- type initialized to: "Bug"
Ticket change [4062e13341] (rid 121618) by dgp on 2001-08-21 13:08:29:
- assignee changed to: "andreas_kupries"
- foundin changed to: "obsolete: 8.4a4"
- icomment:
Logged In: YES user_id=80530 Hmmm... looks like a duplicate of 442636, but that report is closed, and the problem is still there in the HEAD. Anyhow, the problem is in unix/tclUnixPipe.c, part of the ChannelTypes category, so I'm passing the buck.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "27. Channel Types"
- username: "dgp"
Ticket change [eb6ff3b3a0] (rid 103542) by andreas_kupries on 2001-08-23 05:43:02:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=75003 Jeff tells me that Vince Darley knows how to actually fix this and that he will do so. Changing maintainer.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
Ticket change [f9ea772ea9] (rid 91777) by vincentdarley on 2001-08-24 01:32:39:
- icomment:
Logged In: YES user_id=32170 Can't fix this until we can dlload from memory or from the contents of a channel (instead of from a named file). Not sure what state that means we should move this to.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [2ad474266b] (rid 118639) by dkf on 2001-09-03 19:30:34:
- priority changed to: "6"
Ticket change [1528362184] (rid 124523) by vincentdarley on 2001-09-03 20:49:09:
- icomment:
Logged In: YES user_id=32170 This cannot be fixed until we can dlload from memory or the contents of a channel. This bug is postponed until such a time.
- login: "vincentdarley"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- resolution changed to: "Postponed"
- username: "vincentdarley"
- icomment:
Ticket change [135181ae77] (rid 124194) by dkf on 2001-09-03 21:54:14:
- icomment:
Logged In: YES user_id=79902 Apparently mkstemp() modifies its string 'template' argument to be the file that it has opened for you, though the documentation (on Solaris) is not particularly clear on this point (but experiment confirms it.) Maybe it is possible to bodge a fix like that? (The permissions on the temporary file seem sensible too, and /tmp is usually configured to be difficult for someone to compromise *too* much.)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [ec7a1c608a] (rid 103712) by vincentdarley on 2001-09-03 23:36:53:
- icomment:
Logged In: YES user_id=32170 It does look as if mkstemp() could do the job, since it is documented to do what you want. I'll take a look...
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [b0a84e6c75] (rid 98023) by vincentdarley on 2001-09-03 23:43:05:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=32170 How about: Tcl_Obj* TclpTempFileName() { char fileName[L_tmpnam + 9]; Tcl_Obj *result = NULL; int fd; /* * We should also check against making more than * TMP_MAX of these. */ strcpy(fileName, P_tmpdir);/* INTL: Native. */ if (fileName[strlen(fileName) - 1] != '/') { strcat(fileName, "/");/* INTL: Native. */ } strcat(fileName, "tclXXXXXX"); fd = mkstemp(fileName);/* INTL: Native. */ if (fd == -1) { return NULL; } fcntl(fd, F_SETFD, FD_CLOEXEC); unlink(fileName);/* INTL: Native. */ result = TclpNativeToNormalized((ClientData) fileName); close (fd); return result; } - login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [49851f7eb7] (rid 100066) by vincentdarley on 2001-09-04 00:46:37:
- icomment:
File Added - 10332: tclload.patch Logged In: YES user_id=32170 I've attached a patch to fix this and enable the 'test' filesystem to do what it is supposed to.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Add attachment "tclload.patch" [5c96237c9d] (rid 115335) by vincentdarley on 2001-09-04 00:46:37.
Ticket change [7f61b2b165] (rid 97552) by vincentdarley on 2001-09-05 01:10:50:
- closedate changed to: "2001-09-04T18:10:50"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Patch passes test-suite on linux, windows, so labelled as fixed. Am happy to debate/modify precise implementation as desired.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"