1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/archive
Sebastiaan van Stijn 25ada76437
pkg/archive: Unpack() use 0755 permissions for missing directories
Commit edb62a3ace fixed a bug in MkdirAllAndChown()
that caused the specified permissions to not be applied correctly. As a result
of that bug, the configured umask would be applied.

When extracting archives, Unpack() used 0777 permissions when creating missing
parent directories for files that were extracted.
Before edb62a3ace, this resulted in actual
permissions of those directories to be 0755 on most configurations (using a
default 022 umask).

Creating these directories should not depend on the host's umask configuration.
This patch changes the permissions to 0755 to match the previous behavior,
and to reflect the original intent of using 0755 as default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-17 16:24:52 +01:00
..
testdata
archive.go pkg/archive: Unpack() use 0755 permissions for missing directories 2021-02-17 16:24:52 +01:00
archive_linux.go pkg/archive: escape ":" symbol in overlay lowerdir 2020-05-12 13:28:04 +09:00
archive_linux_test.go pkg/archive: use containerd/sys to detect UserNamespaces 2020-06-15 13:06:47 +02:00
archive_other.go pkg/archive: support overlayfs in userns (Ubuntu kernel only) 2018-12-11 07:18:37 +09:00
archive_test.go archive: avoid creating parent dirs for XGlobalHeader 2021-02-04 18:38:51 -08:00
archive_unix.go pkg/archive: allow mknodding FIFO inside userns 2021-01-26 17:43:25 +09:00
archive_unix_test.go pkg/archive: Unpack() use 0755 permissions for missing directories 2021-02-17 16:24:52 +01:00
archive_windows.go pkg/archive: normalize comment formatting 2019-11-27 15:38:49 +01:00
archive_windows_test.go LCOW: lazycontext: Use correct lstat, fix archive check 2018-06-27 13:29:21 -07:00
changes.go pkg/archive fixes, and port most unit tests to Windows 2018-11-26 10:20:40 -08:00
changes_linux.go Update overlay2 to use naive diff for changes 2018-06-20 11:07:36 -07:00
changes_other.go Add canonical import comment 2018-02-05 16:51:57 -05:00
changes_posix_test.go Various code-cleanup 2018-05-23 17:50:54 +02:00
changes_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
changes_unix.go pkg/archive fixes, and port most unit tests to Windows 2018-11-26 10:20:40 -08:00
changes_windows.go pkg/archive fixes, and port most unit tests to Windows 2018-11-26 10:20:40 -08:00
copy.go pkg/archive:CopyTo(): fix for long dest filename 2019-01-24 18:10:52 -08:00
copy_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
copy_unix_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
copy_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
diff.go Merge pull request #39699 from thaJeztah/mkdirall_dropin 2019-08-27 16:27:53 -07:00
diff_test.go pkg/archive fixes, and port most unit tests to Windows 2018-11-26 10:20:40 -08:00
example_changes.go Update logrus to v1.0.1 2017-07-31 13:16:46 -07:00
README.md
time_linux.go Various code-cleanup 2018-05-23 17:50:54 +02:00
time_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
utils_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
whiteouts.go Add canonical import comment 2018-02-05 16:51:57 -05:00
wrap.go Add canonical import comment 2018-02-05 16:51:57 -05:00
wrap_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00

This code provides helper functions for dealing with archive files.