containerd/archive
Artem Khramov 2bffb5f9b2
FreeBSD: fix tar headers & the nil check on getxattr
On FreeBSD + zfs, stat call seem to return garbage in RDev for regular
files & folders. The value returned is large enough not to fit into
`Devmajor` & `Devminor` fields of the tar header. Fortunately, these
fields are required just for special devices.

This change

* adds a check into `setHeaderForSpecialDevice` that the
  input header represents a special device. If it's not the case, we
  don't set the Devmajor & Devminor fields.

* fixes the nil check on `getxattr`: it never returns nils, but rather
  an empty slice instead

Signed-off-by: Artem Khramov <akhramov@pm.me>
2021-09-21 19:22:41 +03:00
..
compression replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00
tartest Fix annotation typo error 2018-12-14 23:18:42 +08:00
issues_test.go Move testutils to pkg 2018-05-22 17:08:38 -04:00
tar_freebsd.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
tar_linux_test.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
tar_mostunix.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
tar_opts_linux.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
tar_opts_windows.go docs: rename main to master 2021-08-10 09:42:16 -07:00
tar_opts.go Implement windowsDiff.Compare via hcsshim/pkg/ociwclayer 2021-04-10 02:02:33 +10:00
tar_test.go replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00
tar_unix.go FreeBSD: fix tar headers & the nil check on getxattr 2021-09-21 19:22:41 +03:00
tar_windows.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
tar.go FreeBSD: fix tar headers & the nil check on getxattr 2021-09-21 19:22:41 +03:00
time_unix.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
time_windows.go Licence header added 2018-02-19 10:32:26 +09:00
time.go Licence header added 2018-02-19 10:32:26 +09:00