mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #3878 from sjahl/apt_repository-perms-fix
setting 0644 permissions on mkstemp file handles. Fixes issue #3857
This commit is contained in:
commit
00256af5bd
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue