summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
Commit message (Collapse)AuthorAgeFilesLines
* Improvement to the previous fix suggested by Thomas Bellman: if theGuido van Rossum1998-10-241-2/+6
| | | | | unlink() or fdopen() fail, close the file descriptor and re-raise the exception.
* The TemporaryFile() function has a security leak -- because theGuido van Rossum1998-10-241-5/+6
| | | | | | | | | | | | | filenames generated are easily predictable, it is possible to trick an unsuspecting program into overwriting another file by creating a symbolic link with the predicted name. Fix this by using the low-level os.open() function with the O_EXCL flag and mode 0700. On non-Unix platforms, presumably there are no symbolic links so the problem doesn't exist. The explicit test for Unix (posix, actually) makes it possible to change the non-Unix logic to work without a try-except clause. The mktemp() file is as unsafe as ever.
* Fix so that after a fork() -- on Unix only -- the template getsGuido van Rossum1998-10-141-3/+9
| | | | recalculated.
* On the Mac, create the Temporary Items folder if it does not exist yet.Guido van Rossum1998-04-281-1/+1
| | | | (Jack)
* When getcwd() doesn't exist or raises an exception, don't fail butGuido van Rossum1998-04-091-1/+5
| | | | | fall back to using os.curdir instead; if it is fine, don't use os.curdir at all.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-58/+58
|
* Add new optional parameter 'suffix' (default ''), which is appended toGuido van Rossum1997-12-191-10/+11
| | | | the temporary file name. Also some minor formatting of Jim F's code.
* On NT, use a better template, ~XXX- where XXX is os.getpid().Guido van Rossum1997-12-151-0/+2
|
* Added TemporaryFile and wrapper class by Jim Fulton.Guido van Rossum1997-08-121-2/+41
| | | | Look in more env vars (for NT: TEMP, TMP).
* (Jack:) Better MacOS support.Guido van Rossum1997-04-111-0/+10
|
* Attempt at Windows-NT compatibility.Guido van Rossum1996-08-201-1/+4
|
* Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it.Guido van Rossum1996-08-081-0/+2
|
* Be more careful about default temp dirGuido van Rossum1996-05-281-10/+20
|
* Mostly rewritten to be more flexible and more portableGuido van Rossum1992-03-311-18/+41
| | | | ./
* Use $TMPDIR if it is set in the environment.Guido van Rossum1992-01-141-1/+6
|
* Use 'global' instead of struct kludge.Guido van Rossum1991-12-261-6/+5
|
* New class syntax.Guido van Rossum1991-12-261-1/+1
|
* Initial revisionGuido van Rossum1991-11-121-0/+32