Browse code

Update containerd & runc

containerd: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc: 51371867a01c467f08af739783b8beafc15

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

Kenfe-Mickael Laventure authored on 2016/11/19 01:15:20
Showing 3 changed files
... ...
@@ -1,8 +1,8 @@
1 1
 #!/bin/sh
2 2
 
3 3
 TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
4
-RUNC_COMMIT=ac031b5bf1cc92239461125f4c1ffb760522bbf2
5
-CONTAINERD_COMMIT=8517738ba4b82aff5662c97ca4627e7e4d03b531
4
+RUNC_COMMIT=51371867a01c467f08af739783b8beafc15
5
+CONTAINERD_COMMIT=03e5862ec0d8d3b3f750e19fca3ee367e13c090e
6 6
 TINI_COMMIT=949e6facb77383876aeff8a6944dde66b3089574
7 7
 LIBNETWORK_COMMIT=0f534354b813003a754606689722fe253101bc4e
8 8
 VNDR_COMMIT=f56bd4504b4fad07a357913687fb652ee54bb3b0
... ...
@@ -59,7 +59,7 @@ github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f
59 59
 github.com/docker/go v1.5.1-1-1-gbaf439e
60 60
 github.com/agl/ed25519 d2b94fd789ea21d12fac1a4443dd3a3f79cda72c
61 61
 
62
-github.com/opencontainers/runc ac031b5bf1cc92239461125f4c1ffb760522bbf2 # libcontainer
62
+github.com/opencontainers/runc 51371867a01c467f08af739783b8beafc15 # libcontainer
63 63
 github.com/opencontainers/runtime-spec 1c7c27d043c2a5e513a44084d2b10d77d1402b8c # specs
64 64
 github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
65 65
 # libcontainer deps (see src/github.com/opencontainers/runc/Godeps/Godeps.json)
... ...
@@ -96,7 +96,7 @@ google.golang.org/cloud dae7e3d993bc3812a2185af60552bb6b847e52a0
96 96
 github.com/docker/docker-credential-helpers f72c04f1d8e71959a6d103f808c50ccbad79b9fd
97 97
 
98 98
 # containerd
99
-github.com/docker/containerd 8517738ba4b82aff5662c97ca4627e7e4d03b531
99
+github.com/docker/containerd 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
100 100
 github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4
101 101
 
102 102
 # cluster
... ...
@@ -598,11 +598,11 @@ void nsexec(void)
598 598
 
599 599
 	/*
600 600
 	 * Stage 1: We're in the first child process. Our job is to join any
601
-	 *          provided user namespaces in the netlink payload. If we've been
602
-	 *          asked to CLONE_NEWUSER, we will unshare the user namespace and
603
-	 *          ask our parent (stage 0) to set up our user mappings for us.
604
-	 *          Then, we unshare the rest of the requested namespaces and
605
-	 *          create a new child (stage 2: JUMP_INIT).  We then send the
601
+	 *          provided namespaces in the netlink payload and unshare all
602
+	 *          of the requested namespaces. If we've been asked to
603
+	 *          CLONE_NEWUSER, we will ask our parent (stage 0) to set up
604
+	 *          our user mappings for us. Then, we create a new child
605
+	 *          (stage 2: JUMP_INIT) for PID namespace. We then send the
606 606
 	 *          child's PID to our parent (stage 0).
607 607
 	 */
608 608
 	case JUMP_CHILD: {
... ...
@@ -660,7 +660,15 @@ void nsexec(void)
660 660
 					bail("failed to sync with parent: SYNC_USERMAP_ACK: got %u", s);
661 661
 			}
662 662
 
663
-			/* TODO: What about non-namespace clone flags that we're dropping here? */
663
+			/*
664
+			 * TODO: What about non-namespace clone flags that we're dropping here?
665
+			 *
666
+			 * We fork again because of PID namespace, setns(2) or unshare(2) don't
667
+			 * change the PID namespace of the calling process, because doing so
668
+			 * would change the caller's idea of its own PID (as reported by getpid()),
669
+			 * which would break many applications and libraries, so we must fork
670
+			 * to actually enter the new PID namespace.
671
+			 */
664 672
 			child = clone_parent(&env, JUMP_INIT);
665 673
 			if (child < 0)
666 674
 				bail("unable to fork: init_func");