diff options
author | Andrei Vagin <avagin@google.com> | 2019-04-04 17:42:51 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-04 17:43:53 -0700 |
commit | 88409e983c463b6d9c8085e7fdbe7ff45b3c5184 (patch) | |
tree | f5ba3e9b1c67a7641a8d4d7c4106bd5bc5c2dcf1 /pkg/sentry/fs/proc | |
parent | 75a5ccf5d98876c26305da0feff20e4a148027ec (diff) |
gvisor: Add support for the MS_NOEXEC mount option
https://github.com/google/gvisor/issues/145
PiperOrigin-RevId: 242044115
Change-Id: I8f140fe05e32ecd438b6be218e224e4b7fe05878
Diffstat (limited to 'pkg/sentry/fs/proc')
-rw-r--r-- | pkg/sentry/fs/proc/mounts.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/fs/proc/mounts.go b/pkg/sentry/fs/proc/mounts.go index 7111e5c0f..1e62af8c6 100644 --- a/pkg/sentry/fs/proc/mounts.go +++ b/pkg/sentry/fs/proc/mounts.go @@ -129,6 +129,9 @@ func (mif *mountInfoFile) ReadSeqFileData(ctx context.Context, handle seqfile.Se if m.Flags.NoAtime { opts += ",noatime" } + if m.Flags.NoExec { + opts += ",noexec" + } fmt.Fprintf(&buf, "%s ", opts) // (7) Optional fields: zero or more fields of the form "tag[:value]". |