mirror of
https://github.com/containers/podman.git
synced 2025-11-13 17:47:13 +08:00
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:
8
vendor/github.com/containers/common/pkg/chown/chown_unix.go
generated
vendored
8
vendor/github.com/containers/common/pkg/chown/chown_unix.go
generated
vendored
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user