File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ version = 2
3535 # enable_selinux indicates to enable the selinux support.
3636 enable_selinux = false
3737
38+ # selinux_category_range allows the upper bound on the category range to be set.
39+ # if not specified or set to 0, defaults to 1024 from the selinux package.
40+ selinux_category_range = 1024
41+
3842 # sandbox_image is the image used by sandbox container.
3943 sandbox_image = " k8s.gcr.io/pause:3.2"
4044
Original file line number Diff line number Diff line change @@ -198,6 +198,9 @@ type PluginConfig struct {
198198 StreamIdleTimeout string `toml:"stream_idle_timeout" json:"streamIdleTimeout"`
199199 // EnableSelinux indicates to enable the selinux support.
200200 EnableSelinux bool `toml:"enable_selinux" json:"enableSelinux"`
201+ // SelinuxCategoryRange allows the upper bound on the category range to be set.
202+ // If not specified or set to 0, defaults to 1024 from the selinux package.
203+ SelinuxCategoryRange int `toml:"selinux_category_range" json:"selinuxCategoryRange"`
201204 // SandboxImage is the image used by sandbox container.
202205 SandboxImage string `toml:"sandbox_image" json:"sandboxImage"`
203206 // StatsCollectPeriod is the period (in seconds) of snapshots stats collection.
Original file line number Diff line number Diff line change @@ -44,12 +44,13 @@ func DefaultConfig() PluginConfig {
4444 },
4545 },
4646 },
47- DisableTCPService : true ,
48- StreamServerAddress : "127.0.0.1" ,
49- StreamServerPort : "0" ,
50- StreamIdleTimeout : streaming .DefaultConfig .StreamIdleTimeout .String (), // 4 hour
51- EnableSelinux : false ,
52- EnableTLSStreaming : false ,
47+ DisableTCPService : true ,
48+ StreamServerAddress : "127.0.0.1" ,
49+ StreamServerPort : "0" ,
50+ StreamIdleTimeout : streaming .DefaultConfig .StreamIdleTimeout .String (), // 4 hour
51+ EnableSelinux : false ,
52+ SelinuxCategoryRange : 1024 ,
53+ EnableTLSStreaming : false ,
5354 X509KeyPairStreaming : X509KeyPairStreaming {
5455 TLSKeyFile : "" ,
5556 TLSCertFile : "" ,
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ func (c *criService) initPlatform() error {
4444 if ! selinux .GetEnabled () {
4545 logrus .Warn ("Selinux is not supported" )
4646 }
47+ if r := c .config .SelinuxCategoryRange ; r > 0 {
48+ selinux .CategoryRange = uint32 (r )
49+ }
4750 } else {
4851 selinux .SetDisabled ()
4952 }
Original file line number Diff line number Diff line change 11# cri dependencies
22github.com/docker/docker 4634ce647cf2ce2c6031129ccd109e557244986f
33github.com/opencontainers/selinux v1.6.0
4- github.com/willf/bitset d5bec3311243426a3c6d1b7a795f24b17c686dbb # 1.1.10+ used by selinux pkg
54github.com/tchap/go-patricia v2.2.6
5+ github.com/willf/bitset d5bec3311243426a3c6d1b7a795f24b17c686dbb # 1.1.10+ used by selinux pkg
66
77# containerd dependencies
88github.com/beorn7/perks v1.0.1
You can’t perform that action at this time.
0 commit comments