summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/node_prepare_syscall.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-06-26 18:44:52 +0200
committerJakob Unterwurzacher2021-06-26 18:49:54 +0200
commit5306fc345be41371820ea50a3f64efab08f2e74c (patch)
treed17b38de256d04f2e48def501d49602f0675f986 /internal/fusefrontend/node_prepare_syscall.go
parent1f29542b39654bda417ed436b8640b2f2e4f0d6e (diff)
fusefrontend: convert last callers from openBackingDir to prepareAtSyscall
Diffstat (limited to 'internal/fusefrontend/node_prepare_syscall.go')
-rw-r--r--internal/fusefrontend/node_prepare_syscall.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/fusefrontend/node_prepare_syscall.go b/internal/fusefrontend/node_prepare_syscall.go
index fa558e8..283096f 100644
--- a/internal/fusefrontend/node_prepare_syscall.go
+++ b/internal/fusefrontend/node_prepare_syscall.go
@@ -98,11 +98,12 @@ func (n *Node) prepareAtSyscallMyself() (dirfd int, cName string, errno syscall.
if n.IsRoot() {
var err error
rn := n.rootNode()
- dirfd, cName, err = rn.openBackingDir("")
+ // Open cipherdir (following symlinks)
+ dirfd, err = syscallcompat.Open(rn.args.Cipherdir, syscall.O_DIRECTORY|syscallcompat.O_PATH, 0)
if err != nil {
- errno = fs.ToErrno(err)
+ return -1, "", fs.ToErrno(err)
}
- return
+ return dirfd, ".", 0
}
// Otherwise convert to prepareAtSyscall of parent node