From 4dd68c07a02deb1c718d41ad5559d29e27a71533 Mon Sep 17 00:00:00 2001 From: sjahl Date: Sun, 18 Aug 2013 11:03:43 -0400 Subject: [PATCH] setting 0644 permissions on mkstemp file handles. Fixes issue #3857 --- library/packaging/apt_repository | 1 + 1 file changed, 1 insertion(+) diff --git a/library/packaging/apt_repository b/library/packaging/apt_repository index 3ee5ec3e8f1..a61a93b5864 100644 --- a/library/packaging/apt_repository +++ b/library/packaging/apt_repository @@ -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: