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 609d87003a
pkg/archive: strip "write" bits again on Windows
1. Commit 1a22418f9f changed permissions to `0700`
   on Windows, or more factually, it removed `rw` (`chmod g-rw,o-rw`) and added
   executable bits (`chmod u+x`).
2. This was too restrictive, and b7dc9040f0 changed
   permissions to only remove the group- and world-writable bits to give read and
  execute access to everyone, but setting execute permissions for everyone.
3. However, this also removed the non-permission bits, so 41eb61d5c2
   updated the code to preserve those, and keep parity with Linux.

This changes it back to `2.`. I wonder (_think_) _permission_ bits (read, write)
can be portable, except for the _executable_ bit (which is not present on Windows).
The alternative could be to keep the permission bits, and only set the executable
bit (`perm | 0111`) for everyone (equivalent of `chmod +x`), but that likely would
be a breaking change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-05 10:50:10 +02:00
..
testdata
archive.go pkg/archive: remove backward compat hack for go < 1.9 2022-09-04 21:44:02 +02:00
archive_linux.go pkg/archive: audit gosec file-traversal lints 2022-02-18 15:42:22 -05:00
archive_linux_test.go gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
archive_other.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
archive_test.go test: use T.Setenv to set env vars in tests 2022-04-23 17:44:16 +08:00
archive_unix.go Remove local fork of archive/tar package 2022-02-18 13:40:19 -05:00
archive_unix_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
archive_windows.go pkg/archive: strip "write" bits again on Windows 2022-09-05 10:50:10 +02:00
archive_windows_test.go pkg/archive: strip "write" bits again on Windows 2022-09-05 10:50:10 +02:00
changes.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
changes_linux.go Update overlay2 to use naive diff for changes 2018-06-20 11:07:36 -07:00
changes_other.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
changes_posix_test.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
changes_test.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
changes_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
changes_windows.go pkg/archive fixes, and port most unit tests to Windows 2018-11-26 10:20:40 -08:00
copy.go all: replace strings.Replace with strings.ReplaceAll 2022-05-09 19:45:40 +08:00
copy_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
copy_unix_test.go gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
copy_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
diff.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
diff_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
example_changes.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
README.md
time_linux.go Various code-cleanup 2018-05-23 17:50:54 +02:00
time_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
utils_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
whiteouts.go Add canonical import comment 2018-02-05 16:51:57 -05:00
wrap.go gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02: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.