Remove dependency on libcontainer/system
This swaps the RunningInUserNS() function that we're using from libcontainer/system with the one in containerd/sys. This removes the dependency on libcontainer/system, given these were the only functions we're using from that package. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/containerd/containerd/sys"
|
||||
cni "github.com/containerd/go-cni"
|
||||
runcsystem "github.com/opencontainers/runc/libcontainer/system"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -34,7 +34,7 @@ const networkAttachCount = 2
|
||||
func (c *criService) initPlatform() error {
|
||||
var err error
|
||||
|
||||
if runcsystem.RunningInUserNS() {
|
||||
if sys.RunningInUserNS() {
|
||||
if !(c.config.DisableCgroup && !c.apparmorEnabled() && c.config.RestrictOOMScoreAdj) {
|
||||
logrus.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true")
|
||||
}
|
||||
|
Reference in New Issue
Block a user