diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/files/0001-temporarily-disable-selinux.GetEnabled-error-checks.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/files/0001-temporarily-disable-selinux.GetEnabled-error-checks.patch index f803766074..886ab1f635 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/files/0001-temporarily-disable-selinux.GetEnabled-error-checks.patch +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/files/0001-temporarily-disable-selinux.GetEnabled-error-checks.patch @@ -26,7 +26,7 @@ index 3b42f301..bace067d 100644 return fmt.Errorf("unable to restrict sys entries without a private MNT namespace") } - if config.ProcessLabel != "" && !selinux.GetEnabled() { -- return fmt.Errorf("selinux label is specified in config, but selinux is disabled or not supported") +- return errors.New("selinux label is specified in config, but selinux is disabled or not supported") - } return nil @@ -41,14 +41,14 @@ index b05e7b60..ce50db14 100644 "github.com/opencontainers/runtime-spec/specs-go" - selinux "github.com/opencontainers/selinux/go-selinux" - "github.com/coreos/go-systemd/activation" + "github.com/coreos/go-systemd/v22/activation" "github.com/pkg/errors" @@ -388,9 +387,6 @@ func validateProcessSpec(spec *specs.Process) error { if len(spec.Args) == 0 { return fmt.Errorf("args must not be empty") } - if spec.SelinuxLabel != "" && !selinux.GetEnabled() { -- return fmt.Errorf("selinux label is specified in config, but selinux is disabled or not supported") +- return errors.New("selinux label is specified in config, but selinux is disabled or not supported") - } return nil }