Message 215020 - Python tracker (original) (raw)

Message215020

Author desrt
Recipients desrt
Date 2014-03-28.07:04:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id 1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za
In-reply-to
Content
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.
History
Date User Action Args
2014-03-28 07:04:06 desrt set recipients: + desrt
2014-03-28 07:04:06 desrt set messageid: 1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za
2014-03-28 07:04:06 desrt link issue21082 messages
2014-03-28 07:04:05 desrt create