Blob Blame Raw
diff -up cri-1.11.1/pkg/server/helpers.go.fix_InitLabels cri-1.11.1/pkg/server/helpers.go
--- cri-1.11.1/pkg/server/helpers.go.fix_InitLabels	2018-08-09 20:37:54.000000000 +0200
+++ cri-1.11.1/pkg/server/helpers.go	2019-07-10 00:56:59.377844653 +0200
@@ -35,7 +35,6 @@ import (
 	imagespec "github.com/opencontainers/image-spec/specs-go/v1"
 	runtimespec "github.com/opencontainers/runtime-spec/specs-go"
 	"github.com/opencontainers/runtime-tools/generate"
-	"github.com/opencontainers/selinux/go-selinux"
 	"github.com/opencontainers/selinux/go-selinux/label"
 	"github.com/pkg/errors"
 	"golang.org/x/net/context"
@@ -380,7 +379,12 @@ func initSelinuxOpts(selinuxOpt *runtime
 		selinuxOpt.GetRole(),
 		selinuxOpt.GetType(),
 		selinuxOpt.GetLevel())
-	return label.InitLabels(selinux.DupSecOpt(labelOpts))
+
+	options, err := label.DupSecOpt(labelOpts)
+	if err != nil {
+		return "", "", err
+	}
+	return label.InitLabels(options)
 }
 
 // isInCRIMounts checks whether a destination is in CRI mount list.