Files
podman/vendor/github.com/containers/buildah/pkg/util/version_unix.go
Paul Holzinger 83a0299309 vendor: update buildah to latest
Includes a fix for CVE-2024-9407

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-02 18:04:39 +02:00

19 lines
297 B
Go

//go:build !windows
package util
import (
"bytes"
"golang.org/x/sys/unix"
)
func ReadKernelVersion() (string, error) {
var uname unix.Utsname
if err := unix.Uname(&uname); err != nil {
return "", err
}
n := bytes.IndexByte(uname.Release[:], 0)
return string(uname.Release[:n]), nil
}