Commit Graph

9 Commits

Author SHA1 Message Date
Kir Kolyshkin 55d55bc773 bind/mount.go: fix linter comment
Newer golangci-lint does not understand the nolint: directive
because it is followed by some comment.

To fix, add a comment before the (human) comment.

While at it, remove the space after // since comments targeted for
non-humans should not have space (this is currently not enforced by
golangci-lint).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 12:56:35 -08:00
Nalin Dahyabhai 1799dfc47e CI: expand cross-compile checks
Expand the list of OS/arch combinations we check when we're checking if
we can successfully be cross-compiled, and fix up a couple of places
that wouldn't pass otherwise.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-03 14:35:32 -04:00
Nalin Dahyabhai ca4eb1a93c bind: don't complain about missing mountpoints
When we go to unmount a tree of mounts, if one of the directories isn't
there, instead of returning an error as before, log a debug message and
keep going.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #1996
Approved by: rhatdan
2019-12-06 12:01:30 +00:00
Valentin Rothberg b165cfb986 bind/util.go: remove unused func
Reported by golangci-lint.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>

Closes: #1678
Approved by: rhatdan
2019-06-19 11:33:36 +00:00
Daniel J Walsh ba012ddec6
Move buildah from projecatatomic/buildah to containers/buildah
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-18 08:06:11 -04:00
Nalin Dahyabhai 347478cccd chroot isolation: chroot() before setting up seccomp
Make the chroot() call before applying a seccomp filter, which might not
allow us to do it.  Add more debugging messages.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #979
Approved by: rhatdan
2018-08-31 13:46:10 +00:00
baude 63862c4047 bind/mount_unsupported.go: remove import errors
In bind/mount_unsupported.go, only one import is needed. The current version
causes compilation errors when building for darwin.

../src/github.com/projectatomic/libpod/vendor/github.com/projectatomic/buildah/bind/mount_unsupported.go:6:2: imported and not used: "fmt"
../src/github.com/projectatomic/libpod/vendor/github.com/projectatomic/buildah/bind/mount_unsupported.go:7:2: imported and not used: "os"
../src/github.com/projectatomic/libpod/vendor/github.com/projectatomic/buildah/bind/mount_unsupported.go:8:2: imported and not used: "path/filepath"

...

Signed-off-by: baude <bbaude@redhat.com>
2018-06-26 13:34:04 -05:00
Nalin Dahyabhai 2994914aba bind: factor out UnmountMountpoints
Factor out logic for unmounting our bind mounts, and make use of the
parent/child relationship between mountpoints to decide which order to
use, rather than sorting based on their mountpoint paths.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #800
Approved by: rhatdan
2018-06-19 14:54:32 +00:00
Nalin Dahyabhai 002c18a3bb Break out SetupIntermediateMountNamespace()
Break runSetupIntermediateMountNamespace() into its own package.
Move stringInSlice(), getHostIDs(), and getHostRootIDs() into the util
subdirectory and export them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #796
Approved by: rhatdan
2018-06-18 18:38:54 +00:00