diff options
author | Sebastian Lackner | 2019-01-07 00:21:17 +0100 |
---|---|---|
committer | rfjakob | 2019-01-07 21:19:13 +0100 |
commit | 2332462e7821d2ebc579f8b4e8bd097449167a0c (patch) | |
tree | 69a0caf2fdbcba6cf9ce72819b8dbc9a0c3e6a9a /internal | |
parent | aa2fa24c4290da4f14a2405c40d6c1e52cb63b25 (diff) |
fusefrontend: Filter O_CREAT in mangleOpenFlags.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/fusefrontend/fs.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index a0e9d9f..e379465 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -124,6 +124,9 @@ func (fs *FS) mangleOpenFlags(flags uint32) (newFlags int) { // accesses. Running xfstests generic/013 on ext4 used to trigger lots of // EINVAL errors due to missing alignment. Just fall back to buffered IO. newFlags = newFlags &^ syscallcompat.O_DIRECT + // Create and Open are two separate FUSE operations, so O_CREAT should not + // be part of the open flags. + newFlags = newFlags &^ syscall.O_CREAT // We always want O_NOFOLLOW to be safe against symlink races newFlags |= syscall.O_NOFOLLOW return newFlags |