summaryrefslogtreecommitdiffhomepage
path: root/runsc/specutils
diff options
context:
space:
mode:
authorKenta Tada <Kenta.Tada@sony.com>2019-09-26 11:59:13 +0900
committerKenta Tada <Kenta.Tada@sony.com>2019-09-26 12:02:01 +0900
commit69f3c79b2410ea94386150a023dc7e216eb9a595 (patch)
tree93813cc675bc4123d5b06379b6855b5213b85a30 /runsc/specutils
parentdd0e5eedaeb21582820856cbe68eb2a625f395aa (diff)
runsc: add the clone flag of cgroup namespace
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
Diffstat (limited to 'runsc/specutils')
-rw-r--r--runsc/specutils/namespace.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/runsc/specutils/namespace.go b/runsc/specutils/namespace.go
index d441419cb..c7dd3051c 100644
--- a/runsc/specutils/namespace.go
+++ b/runsc/specutils/namespace.go
@@ -33,19 +33,19 @@ import (
func nsCloneFlag(nst specs.LinuxNamespaceType) uintptr {
switch nst {
case specs.IPCNamespace:
- return syscall.CLONE_NEWIPC
+ return unix.CLONE_NEWIPC
case specs.MountNamespace:
- return syscall.CLONE_NEWNS
+ return unix.CLONE_NEWNS
case specs.NetworkNamespace:
- return syscall.CLONE_NEWNET
+ return unix.CLONE_NEWNET
case specs.PIDNamespace:
- return syscall.CLONE_NEWPID
+ return unix.CLONE_NEWPID
case specs.UTSNamespace:
- return syscall.CLONE_NEWUTS
+ return unix.CLONE_NEWUTS
case specs.UserNamespace:
- return syscall.CLONE_NEWUSER
+ return unix.CLONE_NEWUSER
case specs.CgroupNamespace:
- panic("cgroup namespace has no associated clone flag")
+ return unix.CLONE_NEWCGROUP
default:
panic(fmt.Sprintf("unknown namespace %v", nst))
}