Browse code

bump up runc

Changes: https://github.com/opencontainers/runc/compare/69663f0bd4b60df09991c08812a60108003fa340...a00bf0190895aa465a5fbed0268888e2c8ddfe85

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>

Akihiro Suda authored on 2018/10/16 14:31:19
Showing 4 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 #!/bin/sh
2 2
 
3 3
 # When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
4
-RUNC_COMMIT=69663f0bd4b60df09991c08812a60108003fa340
4
+RUNC_COMMIT=a00bf0190895aa465a5fbed0268888e2c8ddfe85
5 5
 
6 6
 install_runc() {
7 7
 	# Do not build with ambient capabilities support
... ...
@@ -75,7 +75,7 @@ github.com/pborman/uuid v1.0
75 75
 google.golang.org/grpc v1.12.0
76 76
 
77 77
 # This does not need to match RUNC_COMMIT as it is used for helper packages but should be newer or equal
78
-github.com/opencontainers/runc 00dc70017d222b178a002ed30e9321b12647af2d
78
+github.com/opencontainers/runc a00bf0190895aa465a5fbed0268888e2c8ddfe85
79 79
 github.com/opencontainers/runtime-spec eba862dc2470385a233c7507392675cbeadf7353 # v1.0.1-45-geba862d
80 80
 github.com/opencontainers/image-spec v1.0.1
81 81
 github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
... ...
@@ -186,12 +186,19 @@ type Config struct {
186 186
 	// callers keyring in this case.
187 187
 	NoNewKeyring bool `json:"no_new_keyring"`
188 188
 
189
-	// Rootless specifies whether the container is a rootless container.
190
-	Rootless bool `json:"rootless"`
191
-
192 189
 	// IntelRdt specifies settings for Intel RDT/CAT group that the container is placed into
193 190
 	// to limit the resources (e.g., L3 cache) the container has available
194 191
 	IntelRdt *IntelRdt `json:"intel_rdt,omitempty"`
192
+
193
+	// RootlessEUID is set when the runc was launched with non-zero EUID.
194
+	// Note that RootlessEUID is set to false when launched with EUID=0 in userns.
195
+	// When RootlessEUID is set, runc creates a new userns for the container.
196
+	// (config.json needs to contain userns settings)
197
+	RootlessEUID bool `json:"rootless_euid,omitempty"`
198
+
199
+	// RootlessCgroups is set when unlikely to have the full access to cgroups.
200
+	// When RootlessCgroups is set, cgroups errors are ignored.
201
+	RootlessCgroups bool `json:"rootless_cgroups,omitempty"`
195 202
 }
196 203
 
197 204
 type Hooks struct {
... ...
@@ -82,7 +82,7 @@ struct nlconfig_t {
82 82
 	uint8_t is_setgroup;
83 83
 
84 84
 	/* Rootless container settings. */
85
-	uint8_t is_rootless;
85
+	uint8_t is_rootless_euid;	/* boolean */
86 86
 	char *uidmappath;
87 87
 	size_t uidmappath_len;
88 88
 	char *gidmappath;
... ...
@@ -100,7 +100,7 @@ struct nlconfig_t {
100 100
 #define GIDMAP_ATTR			27284
101 101
 #define SETGROUP_ATTR		27285
102 102
 #define OOM_SCORE_ADJ_ATTR	27286
103
-#define ROOTLESS_ATTR	    27287
103
+#define ROOTLESS_EUID_ATTR	27287
104 104
 #define UIDMAPPATH_ATTR	    27288
105 105
 #define GIDMAPPATH_ATTR	    27289
106 106
 
... ...
@@ -419,8 +419,8 @@ static void nl_parse(int fd, struct nlconfig_t *config)
419 419
 		case CLONE_FLAGS_ATTR:
420 420
 			config->cloneflags = readint32(current);
421 421
 			break;
422
-		case ROOTLESS_ATTR:
423
-			config->is_rootless = readint8(current);
422
+		case ROOTLESS_EUID_ATTR:
423
+			config->is_rootless_euid = readint8(current);	/* boolean */
424 424
 			break;
425 425
 		case OOM_SCORE_ADJ_ATTR:
426 426
 			config->oom_score_adj = current;
... ...
@@ -687,7 +687,7 @@ void nsexec(void)
687 687
 					 * newuidmap/newgidmap shall be used.
688 688
 					 */
689 689
 
690
-					if (config.is_rootless && !config.is_setgroup)
690
+					if (config.is_rootless_euid && !config.is_setgroup)
691 691
 						update_setgroups(child, SETGROUPS_DENY);
692 692
 
693 693
 					/* Set up mappings. */
... ...
@@ -953,7 +953,7 @@ void nsexec(void)
953 953
 			if (setgid(0) < 0)
954 954
 				bail("setgid failed");
955 955
 
956
-			if (!config.is_rootless && config.is_setgroup) {
956
+			if (!config.is_rootless_euid && config.is_setgroup) {
957 957
 				if (setgroups(0, NULL) < 0)
958 958
 					bail("setgroups failed");
959 959
 			}