From b23cd33682a9a8bd727fa45b8424eb55d91c3086 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 1 Nov 2018 11:57:09 -0700 Subject: [PATCH] modify modeRegexp to adapt the default spec of containerd https://github.com/containerd/containerd/blob/master/oci/spec.go#L206, the mode=755 didn't match the pattern modeRegexp = regexp.MustCompile("0[0-7][0-7][0-7]"). Closes #112 Signed-off-by: Juan Change-Id: I469e0a68160a1278e34c9e1dbe4b7784c6f97e5a PiperOrigin-RevId: 219672525 --- pkg/sentry/fs/tmpfs/fs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sentry/fs/tmpfs/fs.go b/pkg/sentry/fs/tmpfs/fs.go index 7c91e248b..453ed5bd9 100644 --- a/pkg/sentry/fs/tmpfs/fs.go +++ b/pkg/sentry/fs/tmpfs/fs.go @@ -44,7 +44,7 @@ const ( ) // modeRegexp is the expected format of the mode option. -var modeRegexp = regexp.MustCompile("0[0-7][0-7][0-7]") +var modeRegexp = regexp.MustCompile("^0?[0-7][0-7][0-7]$") // Filesystem is a tmpfs. //