2022-08-06 00:27:34 +08:00
|
|
|
//go:build !linux && !freebsd
|
2018-05-12 01:08:18 +08:00
|
|
|
|
|
|
|
package chroot
|
|
|
|
|
|
|
|
import (
|
2022-07-06 17:14:06 +08:00
|
|
|
"errors"
|
|
|
|
|
2018-05-12 01:08:18 +08:00
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
|
|
|
)
|
|
|
|
|
|
|
|
func setSelinuxLabel(spec *specs.Spec) error {
|
|
|
|
if spec.Linux.MountLabel != "" {
|
|
|
|
return errors.New("configured an SELinux mount label without SELinux support?")
|
|
|
|
}
|
|
|
|
if spec.Process.SelinuxLabel != "" {
|
|
|
|
return errors.New("configured an SELinux process label without SELinux support?")
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|