mirror of
https://github.com/containers/podman.git
synced 2025-09-25 07:44:24 +08:00

Systemd is now complaining or mentioning /var/run as a legacy directory. It has been many years where /var/run is a symlink to /run on all most distributions, make the change to the default. Partial fix for https://github.com/containers/podman/issues/8369 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
20 lines
424 B
Go
20 lines
424 B
Go
// +build linux
|
|
|
|
package buildah
|
|
|
|
import (
|
|
"github.com/opencontainers/runtime-tools/generate"
|
|
selinux "github.com/opencontainers/selinux/go-selinux"
|
|
)
|
|
|
|
func selinuxGetEnabled() bool {
|
|
return selinux.GetEnabled()
|
|
}
|
|
|
|
func setupSelinux(g *generate.Generator, processLabel, mountLabel string) {
|
|
if processLabel != "" && selinux.GetEnabled() {
|
|
g.SetProcessSelinuxLabel(processLabel)
|
|
g.SetLinuxMountLabel(mountLabel)
|
|
}
|
|
}
|