mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
vendor: update buildah to latest
Includes a fix for CVE-2024-9407 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
7
vendor/github.com/containers/buildah/chroot/run_freebsd.go
generated
vendored
7
vendor/github.com/containers/buildah/chroot/run_freebsd.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build freebsd
|
||||
// +build freebsd
|
||||
|
||||
package chroot
|
||||
|
||||
@@ -191,12 +190,12 @@ func setupChrootBindMounts(spec *specs.Spec, bundlePath string) (undoBinds func(
|
||||
// XXX: This was copied from the linux version which supports bind mounting files.
|
||||
// Leaving it here since I plan to add this to FreeBSD's nullfs.
|
||||
if m.Type != "nullfs" || srcinfo.IsDir() {
|
||||
if err = os.MkdirAll(target, 0111); err != nil {
|
||||
if err = os.MkdirAll(target, 0o111); err != nil {
|
||||
return undoBinds, fmt.Errorf("creating mountpoint %q in mount namespace: %w", target, err)
|
||||
}
|
||||
removes = append(removes, target)
|
||||
} else {
|
||||
if err = os.MkdirAll(filepath.Dir(target), 0111); err != nil {
|
||||
if err = os.MkdirAll(filepath.Dir(target), 0o111); err != nil {
|
||||
return undoBinds, fmt.Errorf("ensuring parent of mountpoint %q (%q) is present in mount namespace: %w", target, filepath.Dir(target), err)
|
||||
}
|
||||
// Don't do this until we can support file mounts in nullfs
|
||||
@@ -219,7 +218,7 @@ func setupChrootBindMounts(spec *specs.Spec, bundlePath string) (undoBinds func(
|
||||
save := saveDir(spec, target)
|
||||
if err := fileutils.Exists(save); err != nil {
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
err = os.MkdirAll(save, 0111)
|
||||
err = os.MkdirAll(save, 0o111)
|
||||
}
|
||||
if err != nil {
|
||||
return undoBinds, fmt.Errorf("creating file mount save directory %q: %w", save, err)
|
||||
|
||||
Reference in New Issue
Block a user