diff --git a/libcontainer/nsinit/init.go b/libcontainer/nsinit/init.go index bafb877..90b97a9 100644 --- a/libcontainer/nsinit/init.go +++ b/libcontainer/nsinit/init.go @@ -84,7 +84,6 @@ func Init(container *libcontainer.Container, uncleanRootfs, consolePath string, if err := label.SetProcessLabel(container.Context["process_label"]); err != nil { return fmt.Errorf("set process label %s", err) } - if err := FinalizeNamespace(container); err != nil { return fmt.Errorf("finalize namespace %s", err) } diff --git a/libcontainer/security/restrict/restrict.go b/libcontainer/security/restrict/restrict.go index 8c08ea1..a9bdc4b 100644 --- a/libcontainer/security/restrict/restrict.go +++ b/libcontainer/security/restrict/restrict.go @@ -1,3 +1,5 @@ +// +build linux + package restrict import ( diff --git a/libcontainer/security/restrict/unsupported.go b/libcontainer/security/restrict/unsupported.go new file mode 100644 index 0000000..6898baa --- /dev/null +++ b/libcontainer/security/restrict/unsupported.go @@ -0,0 +1,9 @@ +// +build !linux + +package restrict + +import "fmt" + +func Restrict(rootfs, empty string) error { + return fmt.Errorf("not supported") +}