setting 0644 permissions on mkstemp file handles. Fixes issue #3857

reviewable/pr18780/r1
sjahl 11 years ago
parent 9b1069c40a
commit 39b0122d37

@ -182,6 +182,7 @@ class SourcesList(object):
if sources:
d, fn = os.path.split(filename)
fd, tmp_path = tempfile.mkstemp(prefix=".%s-" % fn, dir=d)
os.chmod(os.path.join(fd, tmp_path), 0644)
with os.fdopen(fd, 'w') as f:
for n, valid, enabled, source, comment in sources:

Loading…
Cancel
Save