diff options
author | Juan <xionghuan.cn@gmail.com> | 2018-11-01 11:57:09 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-11-01 11:57:54 -0700 |
commit | b23cd33682a9a8bd727fa45b8424eb55d91c3086 (patch) | |
tree | 8009ae65821a3ecfee82909da29724f8a6e0c137 | |
parent | a4cc93c7bf40679e62a2b0eaa2419a4a9536cc14 (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
-rw-r--r-- | pkg/sentry/fs/tmpfs/fs.go | 2 |
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. // |