mirror of
https://github.com/containers/skopeo.git
synced 2025-08-24 09:08:31 +00:00
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.42.1 to 0.43.0. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.42.1...v0.43.0) --- updated-dependencies: - dependency-name: github.com/containers/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
23 lines
410 B
Go
23 lines
410 B
Go
// +build linux,go1.16
|
|
|
|
package selinux
|
|
|
|
import (
|
|
"errors"
|
|
"io/fs"
|
|
"os"
|
|
|
|
"github.com/opencontainers/selinux/pkg/pwalkdir"
|
|
)
|
|
|
|
func rchcon(fpath, label string) error {
|
|
return pwalkdir.Walk(fpath, func(p string, _ fs.DirEntry, _ error) error {
|
|
e := setFileLabel(p, label)
|
|
// Walk a file tree can race with removal, so ignore ENOENT.
|
|
if errors.Is(e, os.ErrNotExist) {
|
|
return nil
|
|
}
|
|
return e
|
|
})
|
|
}
|