summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/node_helpers.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-20 17:06:18 +0200
committerJakob Unterwurzacher2021-08-20 17:06:18 +0200
commitfbccb160438aba6f1e16b26a982122c726afee1a (patch)
tree1faac5ad3587a302fff40a8354382cda21823f3a /internal/fusefrontend_reverse/node_helpers.go
parent14bf80301b4f3f1fb56f2f0b73de0dcc4aab5216 (diff)
-deterministic-names: implement for reverse mode, too
Diffstat (limited to 'internal/fusefrontend_reverse/node_helpers.go')
-rw-r--r--internal/fusefrontend_reverse/node_helpers.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/node_helpers.go b/internal/fusefrontend_reverse/node_helpers.go
index 7b286a0..b7dc086 100644
--- a/internal/fusefrontend_reverse/node_helpers.go
+++ b/internal/fusefrontend_reverse/node_helpers.go
@@ -2,6 +2,7 @@ package fusefrontend_reverse
import (
"context"
+ "log"
"path/filepath"
"syscall"
@@ -129,8 +130,8 @@ func (n *Node) lookupLongnameName(ctx context.Context, nameFile string, out *fus
return
}
defer syscall.Close(fd)
- diriv := pathiv.Derive(d.cPath, pathiv.PurposeDirIV)
rn := n.rootNode()
+ diriv := rn.deriveDirIV(d.cPath)
pName, cFullname, errno := rn.findLongnameParent(fd, diriv, nameFile)
if errno != 0 {
return
@@ -160,6 +161,10 @@ func (n *Node) lookupLongnameName(ctx context.Context, nameFile string, out *fus
// lookupDiriv returns a new Inode for a gocryptfs.diriv file inside `n`.
func (n *Node) lookupDiriv(ctx context.Context, out *fuse.EntryOut) (ch *fs.Inode, errno syscall.Errno) {
+ if rn := n.rootNode(); rn.args.DeterministicNames {
+ log.Panic("BUG: lookupDiriv called but DeterministicNames is set")
+ }
+
d, errno := n.prepareAtSyscall("")
if errno != 0 {
return