Issue 36192: Usage of tmpnam_r
and tempname
is dangerous, better use mkstemp
(original) (raw)
Issue36192
Created on 2019-03-05 08:39 by matrixise, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg337172 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2019-03-05 08:39 |
Hi, I got these warning messages /usr/bin/ld: libpython2.7.a(posixmodule.o): in function `posix_tmpnam': /home/stephane/src/github.com/python/cpython/./Modules/posixmodule.c:7648: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' /usr/bin/ld: libpython2.7.a(posixmodule.o): in function `posix_tempnam': /home/stephane/src/github.com/python/cpython/./Modules/posixmodule.c:7595: warning: the use of `tempnam' is dangerous, better use `mkstemp' Because the EOL of 2.7 is in 2020-01-01, do you think we should fix this issue? | ||
msg337173 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-03-05 08:43 |
The fix of this issue is Python 3. | ||
msg337174 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2019-03-05 08:47 |
yep, sure and there is a RuntimeWarning exception (tmpnam is a potential security risk to your program) when we want to use os.tmpnam(). And in the doc, there is a warning section. Ok, I close this issue. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:12 | admin | set | github: 80373 |
2019-03-05 08:47:51 | matrixise | set | status: open -> closedmessages: + stage: resolved |
2019-03-05 08:43:15 | serhiy.storchaka | set | nosy: + serhiy.storchakamessages: + |
2019-03-05 08:39:41 | matrixise | create |