summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorJuan <xionghuan.cn@gmail.com>2018-11-01 11:57:09 -0700
committerShentubot <shentubot@google.com>2018-11-01 11:57:54 -0700
commitb23cd33682a9a8bd727fa45b8424eb55d91c3086 (patch)
tree8009ae65821a3ecfee82909da29724f8a6e0c137 /pkg/sentry
parenta4cc93c7bf40679e62a2b0eaa2419a4a9536cc14 (diff)
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 <xionghuan.cn@gmail.com> Change-Id: I469e0a68160a1278e34c9e1dbe4b7784c6f97e5a PiperOrigin-RevId: 219672525
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/fs/tmpfs/fs.go2
1 files changed, 1 insertions, 1 deletions
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.
//