Opened 14 years ago
Closed 12 years ago
#2325 closed Bugs (fixed)
Use of tmpnam may produce spurious test results
Reported by: | Dave Abrahams | Owned by: | Daniel James |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.36.0 | Severity: | Problem |
Keywords: | Cc: |
Description
As described in http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html, tmpnam is subject to race conditions, which makes it especially bad for use in testing when testers are exploiting parallelism via threads or processes. Several files in the library are using tmpnam when they should use mkstemp.
Change History (10)
comment:1 by , 14 years ago
Status: | new → assigned |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Oops! Typo in my commit message accidentally closed this bug. Re-opening.
comment:4 by , 13 years ago
Milestone: | Boost 1.37.0 → To Be Determined |
---|---|
Owner: | changed from | to
Status: | reopened → new |
comment:5 by , 12 years ago
Boost.Filesystem v3 has a unique_path function that should work better, as it uses CryptGenRandom to create the file name.
comment:8 by , 12 years ago
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It looks like this already in trunk. Marking as fixed.
(In [48922]) CodeGear C++ fix, from Nicola Musatti. Fixes #2325