mirror of
https://github.com/apple/container.git
synced 2026-10-13 01:29:22 +00:00
Mask high mode bits in archive reader (#816)
This PR masks the high mode bits when setting file attributes for consistency with mode at file creation. Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
This commit is contained in:
1 parent
a4d2510a3c
commit
50f7722296
1 file changed
+1
-1
@@ -398,7 +398,7 @@ extension ArchiveReader {
|
||||
}
|
||||
|
||||
private func setFileAttributes(fd: Int32, entry: WriteEntry) {
|
||||
fchmod(fd, entry.permissions)
|
||||
fchmod(fd, entry.permissions & 0o777)
|
||||
if let owner = entry.owner, let group = entry.group {
|
||||
fchown(fd, owner, group)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user