mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +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:
25
vendor/github.com/containers/buildah/util.go
generated
vendored
25
vendor/github.com/containers/buildah/util.go
generated
vendored
@@ -143,20 +143,19 @@ func ReserveSELinuxLabels(store storage.Store, id string) error {
|
||||
for _, c := range containers {
|
||||
if id == c.ID {
|
||||
continue
|
||||
} else {
|
||||
b, err := OpenBuilder(store, c.ID)
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
// Ignore not exist errors since containers probably created by other tool
|
||||
// TODO, we need to read other containers json data to reserve their SELinux labels
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
// Prevent different containers from using same MCS label
|
||||
if err := label.ReserveLabel(b.ProcessLabel); err != nil {
|
||||
return fmt.Errorf("reserving SELinux label %q: %w", b.ProcessLabel, err)
|
||||
}
|
||||
b, err := OpenBuilder(store, c.ID)
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
// Ignore not exist errors since containers probably created by other tool
|
||||
// TODO, we need to read other containers json data to reserve their SELinux labels
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
// Prevent different containers from using same MCS label
|
||||
if err := label.ReserveLabel(b.ProcessLabel); err != nil {
|
||||
return fmt.Errorf("reserving SELinux label %q: %w", b.ProcessLabel, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user