Merge pull request #100 from rhatdan/selinux

Selinux
This commit is contained in:
Mrunal Patel 2016-10-06 12:28:12 -07:00 committed by GitHub
commit 027aaf15b7
104 changed files with 13739 additions and 44 deletions

View file

@ -8,6 +8,7 @@ import (
"github.com/Sirupsen/logrus"
"github.com/kubernetes-incubator/cri-o/server"
"github.com/opencontainers/runc/libcontainer/selinux"
"github.com/urfave/cli"
"google.golang.org/grpc"
"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
@ -65,6 +66,10 @@ func main() {
Name: "debug",
Usage: "enable debug output for logging",
},
cli.BoolFlag{
Name: "selinux-enabled",
Usage: "enable selinux support",
},
cli.StringFlag{
Name: "log",
Value: "",
@ -81,6 +86,9 @@ func main() {
if c.GlobalBool("debug") {
logrus.SetLevel(logrus.DebugLevel)
}
if !c.GlobalBool("selinux-enabled") {
selinux.SetDisabled()
}
if path := c.GlobalString("log"); path != "" {
f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0666)
if err != nil {