containerd/oci
Sebastiaan van Stijn 94462d8f5d
oci/deviceFromPath(): correctly check device types
This ports the changes of 95a59bf206
to this repository.

From that PR:

    (mode&S_IFCHR == S_IFCHR) is the wrong way of checking the type of an
    inode because the S_IF* bits are actually not a bitmask and instead must
    be checked using S_IF*. This bug was neatly hidden behind a (major == 0)
    sanity-check but that was removed by [1].

    In addition, add a test that makes sure that HostDevices() doesn't give
    rubbish results -- because we broke this and fixed this before[2].

    [1]: 24388be71e ("configs: use different types for .Devices and .Resources.Devices")
    [2]: 3ed492ad33 ("Handle non-devices correctly in DeviceFromPath")

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-01 13:21:34 +01:00
..
client.go Licence header added 2018-02-19 10:32:26 +09:00
mounts_freebsd.go Add ruleset=4 option 2021-05-25 09:17:16 +02:00
mounts.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
spec_opts_linux_test.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
spec_opts_linux.go Fix dir support for devices V3 (#4847) 2021-08-19 07:18:31 -05:00
spec_opts_nonlinux.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
spec_opts_test.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
spec_opts_unix_test.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
spec_opts_unix.go cri: Devices ownership from SecurityContext 2021-08-30 09:30:00 +03:00
spec_opts_windows_test.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
spec_opts_windows.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
spec_opts.go Merge pull request #5973 from Juneezee/deprecate-ioutil 2021-10-01 10:52:06 -07:00
spec_test.go oci.WithPrivileged: set the current caps, not the known caps 2021-02-10 17:14:17 +09:00
spec.go Fix mounts for FreeBSD 2021-05-10 21:49:46 +02:00
utils_unix_test.go oci/deviceFromPath(): correctly check device types 2021-12-01 13:21:34 +01:00
utils_unix.go oci/deviceFromPath(): correctly check device types 2021-12-01 13:21:34 +01:00