Comment 10 for bug 2024204

Revision history for this message
Seth Arnold (seth-arnold) wrote : Re: [Bug 2024204] Re: Hardcoded path in /tmp written to by root

On Wed, Aug 16, 2023 at 07:30:52AM -0000, Christian Ehrhardt  wrote:
> Later I found that this is intentional and considered a security feature.
> To do that NamedTemporaryFile hardcodes this to the minimal permission of 0600 here
> https://hg.python.org/cpython/file/63bde882e311/Lib/tempfile.py#l235

Oh, excellent! Last time I looked at this, I didn't go beyond the official
documentation, which is indeed silent on the issue. I've seen way too many
interfaces that don't allow setting permissions and assumed it was more of
the same.

Thanks