Bump github.com/containers/common from 0.36.0 to 0.37.0

Bumps [github.com/containers/common](https://github.com/containers/common) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.36.0...v0.37.0)

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2021-04-22 07:59:24 +00:00
committed by GitHub
parent 979f047d73
commit 8ebafbde34
15 changed files with 74 additions and 66 deletions

View File

@@ -16,7 +16,7 @@ func ChangeHostPathOwnership(path string, recursive bool, uid, gid int) error {
// Validate if host path can be chowned
isDangerous, err := DangerousHostPath(path)
if err != nil {
return errors.Wrapf(err, "failed to validate if host path is dangerous")
return errors.Wrap(err, "failed to validate if host path is dangerous")
}
if isDangerous {
@@ -42,13 +42,13 @@ func ChangeHostPathOwnership(path string, recursive bool, uid, gid int) error {
})
if err != nil {
return errors.Wrapf(err, "failed to chown recursively host path")
return errors.Wrap(err, "failed to chown recursively host path")
}
} else {
// Get host path info
f, err := os.Lstat(path)
if err != nil {
return errors.Wrapf(err, "failed to get host path information")
return errors.Wrap(err, "failed to get host path information")
}
// Get current ownership
@@ -57,7 +57,7 @@ func ChangeHostPathOwnership(path string, recursive bool, uid, gid int) error {
if uid != currentUID || gid != currentGID {
if err := os.Lchown(path, uid, gid); err != nil {
return errors.Wrapf(err, "failed to chown host path")
return errors.Wrap(err, "failed to chown host path")
}
}
}