diff options
author | Jürg Billeter <j@bitron.ch> | 2019-11-18 11:07:01 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-11-25 09:45:22 +0100 |
commit | e7ff106afc51ed618d8baf539e2fbe9b81d5d5d4 (patch) | |
tree | b6ae77b2dacb80b69fd087efb776fd1fea0a8c6a /src/buildstream/utils.py | |
parent | f439c47deb6ea79e0b17b8e0429d0b834ce15e05 (diff) | |
download | buildstream-e7ff106afc51ed618d8baf539e2fbe9b81d5d5d4.tar.gz |
utils.py: Respect umask in save_file_atomic()
This allows access by buildbox-casd running as different user.
Diffstat (limited to 'src/buildstream/utils.py')
-rw-r--r-- | src/buildstream/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buildstream/utils.py b/src/buildstream/utils.py index 5bc1ce08f..73ee3c88b 100644 --- a/src/buildstream/utils.py +++ b/src/buildstream/utils.py @@ -607,6 +607,8 @@ def save_file_atomic( if tempdir is None: tempdir = os.path.dirname(filename) fd, tempname = tempfile.mkstemp(dir=tempdir) + # Apply mode allowed by umask + os.fchmod(fd, 0o666 & ~_UMASK) os.close(fd) f = open( |