diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-13 17:56:34 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-13 17:57:36 -0800 |
commit | a6024f7f5f6f438c11e30be0f93657b1956fd5ba (patch) | |
tree | a18288d9dec9d08a934d52570ebf6694f7ea1c0c /pkg/sentry/fsimpl/sys | |
parent | 336f758d59a8a0411c745d744a1e5c3294eaf78a (diff) |
Add FileExec flag to OpenOptions
This allow callers to say whether the file is being
opened to be executed, so that the proper checks can
be done from FilesystemImpl.OpenAt()
Updates #1623
PiperOrigin-RevId: 295042595
Diffstat (limited to 'pkg/sentry/fsimpl/sys')
-rw-r--r-- | pkg/sentry/fsimpl/sys/sys.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/sys/sys.go b/pkg/sentry/fsimpl/sys/sys.go index e35d52d17..d693fceae 100644 --- a/pkg/sentry/fsimpl/sys/sys.go +++ b/pkg/sentry/fsimpl/sys/sys.go @@ -97,9 +97,9 @@ func (d *dir) SetStat(fs *vfs.Filesystem, opts vfs.SetStatOptions) error { } // Open implements kernfs.Inode.Open. -func (d *dir) Open(rp *vfs.ResolvingPath, vfsd *vfs.Dentry, flags uint32) (*vfs.FileDescription, error) { +func (d *dir) Open(rp *vfs.ResolvingPath, vfsd *vfs.Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) { fd := &kernfs.GenericDirectoryFD{} - fd.Init(rp.Mount(), vfsd, &d.OrderedChildren, flags) + fd.Init(rp.Mount(), vfsd, &d.OrderedChildren, &opts) return fd.VFSFileDescription(), nil } |