diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-11-19 14:25:58 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-11-19 14:26:03 -0500 |
commit | 44b240470270021e2680afe9de62e5096067a1bf (patch) | |
tree | eae48e206f340a2695b1f54582fb3b28fc7cad2d /vendor/github.com/moby/sys/mountinfo/mounted_linux.go | |
parent | 2755d0255c94ac2ef797636935f83e3351d4d5af (diff) | |
download | podman-44b240470270021e2680afe9de62e5096067a1bf.tar.gz podman-44b240470270021e2680afe9de62e5096067a1bf.tar.bz2 podman-44b240470270021e2680afe9de62e5096067a1bf.zip |
Bump github.com/rootless-containers/rootlesskit from 0.14.5 to 0.14.6
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.14.5 to 0.14.6.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](rootless-containers/rootlesskit@v0.14.5...v0.14.6)
---
updated-dependencies:
- dependency-name: github.com/rootless-containers/rootlesskit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/moby/sys/mountinfo/mounted_linux.go')
-rw-r--r-- | vendor/github.com/moby/sys/mountinfo/mounted_linux.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vendor/github.com/moby/sys/mountinfo/mounted_linux.go b/vendor/github.com/moby/sys/mountinfo/mounted_linux.go index bc9f6b2ad..5c9e3e30e 100644 --- a/vendor/github.com/moby/sys/mountinfo/mounted_linux.go +++ b/vendor/github.com/moby/sys/mountinfo/mounted_linux.go @@ -16,9 +16,6 @@ func mountedByOpenat2(path string) (bool, error) { Flags: unix.O_PATH | unix.O_CLOEXEC, }) if err != nil { - if err == unix.ENOENT { // not a mount - return false, nil - } return false, &os.PathError{Op: "openat2", Path: dir, Err: err} } fd, err := unix.Openat2(dirfd, last, &unix.OpenHow{ @@ -26,20 +23,22 @@ func mountedByOpenat2(path string) (bool, error) { Resolve: unix.RESOLVE_NO_XDEV, }) _ = unix.Close(dirfd) - switch err { + switch err { //nolint:errorlint // unix errors are bare case nil: // definitely not a mount _ = unix.Close(fd) return false, nil case unix.EXDEV: // definitely a mount return true, nil - case unix.ENOENT: // not a mount - return false, nil } // not sure return false, &os.PathError{Op: "openat2", Path: path, Err: err} } func mounted(path string) (bool, error) { + path, err := normalizePath(path) + if err != nil { + return false, err + } // Try a fast path, using openat2() with RESOLVE_NO_XDEV. mounted, err := mountedByOpenat2(path) if err == nil { |