mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
20 lines
432 B
Go
20 lines
432 B
Go
// +build selinux,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)
|
|
}
|
|
}
|