This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 desrt
收信人 desrt
日期 2014-03-28.07:04:05
SpamBayes Score -1.0
Marked as misclassified
Message-id <1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za>
In-reply-to
内容
http://bugs.python.org/file19849/mkdirs.tr.diff introduced a patch with this code in it:

+def _get_masked_mode(mode):
+    mask = umask(0)
+    umask(mask)
+    return mode & ~mask

This changes the umask of the entire process.  If another thread manages to create a file between those two calls then it will be world read/writable, regardless of the original umask of the process.

This is not theoretical: I discovered this bug by observing it happen.
历史
日期 用户 动作 参数
2014-03-28 07:04:06desrt修改recipients: + desrt
2014-03-28 07:04:06desrt修改messageid: <1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za>
2014-03-28 07:04:06desrt链接issue21082 messages
2014-03-28 07:04:05desrt创建