You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/03/20 01:44:42 UTC
[buildstream] branch master updated: tar.py: fix permissions in
tarballs
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/buildstream.git
The following commit(s) were added to refs/heads/master by this push:
new cd75ed5 tar.py: fix permissions in tarballs
new d7f83e8 Merge pull request #1462 from abderrahim/tar-permissions
cd75ed5 is described below
commit cd75ed55a14439212b937c7c5401d3cec9209447
Author: Abderrahim Kitouni <ak...@gnome.org>
AuthorDate: Fri Mar 19 21:12:54 2021 +0100
tar.py: fix permissions in tarballs
the code was confusing & and | and thus making everything executable.
Fixes #1459
---
src/buildstream/plugins/sources/tar.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/buildstream/plugins/sources/tar.py b/src/buildstream/plugins/sources/tar.py
index f9df802..9e53ea6 100644
--- a/src/buildstream/plugins/sources/tar.py
+++ b/src/buildstream/plugins/sources/tar.py
@@ -77,7 +77,7 @@ class ReadableTarInfo(tarfile.TarInfo):
# Respect umask instead of the file mode stored in the archive.
# The only bit used from the embedded mode is the executable bit for files.
umask = utils.get_umask()
- if self.isdir() or bool(self.__permission | 0o100):
+ if self.isdir() or bool(self.__permission & 0o100):
return 0o777 & ~umask
else:
return 0o666 & ~umask