mirror of
https://github.com/containers/podman.git
synced 2025-12-02 19:28:58 +08:00
Bump github.com/containers/buildah from 1.19.6 to 1.19.7
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.19.6 to 1.19.7. - [Release notes](https://github.com/containers/buildah/releases) - [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md) - [Commits](https://github.com/containers/buildah/compare/v1.19.6...v1.19.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
05080a12a9
commit
efc592fba9
8
vendor/github.com/containers/buildah/copier/syscall_unix.go
generated
vendored
8
vendor/github.com/containers/buildah/copier/syscall_unix.go
generated
vendored
@@ -3,10 +3,10 @@
|
||||
package copier
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
@@ -15,13 +15,13 @@ var canChroot = os.Getuid() == 0
|
||||
func chroot(root string) (bool, error) {
|
||||
if canChroot {
|
||||
if err := os.Chdir(root); err != nil {
|
||||
return false, fmt.Errorf("error changing to intended-new-root directory %q: %v", root, err)
|
||||
return false, errors.Wrapf(err, "error changing to intended-new-root directory %q", root)
|
||||
}
|
||||
if err := unix.Chroot(root); err != nil {
|
||||
return false, fmt.Errorf("error chrooting to directory %q: %v", root, err)
|
||||
return false, errors.Wrapf(err, "error chrooting to directory %q", root)
|
||||
}
|
||||
if err := os.Chdir(string(os.PathSeparator)); err != nil {
|
||||
return false, fmt.Errorf("error changing to just-became-root directory %q: %v", root, err)
|
||||
return false, errors.Wrapf(err, "error changing to just-became-root directory %q", root)
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user