소스 검색

Merge pull request #46208 from thaJeztah/oci_DefaultLinuxSpec_consts

oci: DefaultLinuxSpec: use OCI-spec consts for namespaces
Sebastiaan van Stijn 1 년 전
부모
커밋
cb36f57299
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      oci/defaults.go

+ 5 - 5
oci/defaults.go

@@ -122,11 +122,11 @@ func DefaultLinuxSpec() specs.Spec {
 				"/proc/sysrq-trigger",
 			},
 			Namespaces: []specs.LinuxNamespace{
-				{Type: "mount"},
-				{Type: "network"},
-				{Type: "uts"},
-				{Type: "pid"},
-				{Type: "ipc"},
+				{Type: specs.MountNamespace},
+				{Type: specs.NetworkNamespace},
+				{Type: specs.UTSNamespace},
+				{Type: specs.PIDNamespace},
+				{Type: specs.IPCNamespace},
 			},
 			// Devices implicitly contains the following devices:
 			// null, zero, full, random, urandom, tty, console, and ptmx.