diff options
author | Jakob Unterwurzacher | 2018-09-08 17:41:17 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2018-09-08 17:41:17 +0200 |
commit | 9ec9d0c49cfbdc9ceba10d7534b77e527c0a3cdc (patch) | |
tree | a7beb635c6ac0d7580e95811d1803f9750c431aa /internal/fusefrontend_reverse/rfs.go | |
parent | bc14f8dcb65740dac792b50f2582372762e782b8 (diff) |
syscallcompat: untangle OpenNofollow and rename to OpenDirNofollow
The function used to do two things:
1) Walk the directory tree in a manner safe from symlink attacks
2) Open the final component in the mode requested by the caller
This change drops (2), which was only used once, and lets the caller
handle it. This simplifies the function and makes it fit for reuse in
forward mode in openBackingPath(), and for using O_PATH on Linux.
Diffstat (limited to 'internal/fusefrontend_reverse/rfs.go')
-rw-r--r-- | internal/fusefrontend_reverse/rfs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/rfs.go b/internal/fusefrontend_reverse/rfs.go index 1ca0b28..4f94f3c 100644 --- a/internal/fusefrontend_reverse/rfs.go +++ b/internal/fusefrontend_reverse/rfs.go @@ -305,7 +305,7 @@ func (rfs *ReverseFS) OpenDir(cipherPath string, context *fuse.Context) ([]fuse. return nil, fuse.ToStatus(err) } // Read plaintext dir - fd, err := syscallcompat.OpenNofollow(rfs.args.Cipherdir, relPath, syscall.O_RDONLY|syscall.O_DIRECTORY, 0) + fd, err := syscallcompat.OpenDirNofollow(rfs.args.Cipherdir, relPath) if err != nil { return nil, fuse.ToStatus(err) } |