containerd/diff/apply
Maksym Pavlenko 0f51aa874d Add NoSameOwner option when unpacking tars
When unpacking a TAR archive, containerd preserves file's owner:
https://github.com/containerd/containerd/blob/main/archive/tar.go#L384

In some cases this behavior is not desired. In current implementation we
avoid `Lchown` on Windows. Another case when this should be skipped is
when using native snapshotter on darwin and running as non-root user.

This PR extracts a generic option - `WithNoSameOwner` (same as
`tar --no-same-owner`) to skip `Lchown` when its not required.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-09-09 17:07:26 -07:00
..
apply_darwin.go Add NoSameOwner option when unpacking tars 2022-09-09 17:07:26 -07:00
apply_linux_test.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
apply_linux.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
apply_other.go Allow native snapshotter on Darwin 2021-12-04 14:08:09 -08:00
apply.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00