aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend')
-rw-r--r--internal/fusefrontend/args.go2
-rw-r--r--internal/fusefrontend/file.go6
-rw-r--r--internal/fusefrontend/file_allocate_truncate.go2
-rw-r--r--internal/fusefrontend/file_api_check.go2
-rw-r--r--internal/fusefrontend/file_dir_ops.go4
-rw-r--r--internal/fusefrontend/file_holes.go2
-rw-r--r--internal/fusefrontend/file_setattr.go4
-rw-r--r--internal/fusefrontend/node.go4
-rw-r--r--internal/fusefrontend/node_api_check.go2
-rw-r--r--internal/fusefrontend/node_dir_ops.go8
-rw-r--r--internal/fusefrontend/node_helpers.go14
-rw-r--r--internal/fusefrontend/node_open_create.go4
-rw-r--r--internal/fusefrontend/node_prepare_syscall.go2
-rw-r--r--internal/fusefrontend/node_xattr.go4
-rw-r--r--internal/fusefrontend/node_xattr_darwin.go6
-rw-r--r--internal/fusefrontend/node_xattr_freebsd.go4
-rw-r--r--internal/fusefrontend/node_xattr_linux.go6
-rw-r--r--internal/fusefrontend/prepare_syscall_test.go2
-rw-r--r--internal/fusefrontend/statx_linux.go4
-rw-r--r--internal/fusefrontend/xattr_unit_test.go2
20 files changed, 41 insertions, 43 deletions
diff --git a/internal/fusefrontend/args.go b/internal/fusefrontend/args.go
index 84e34af..e936fd3 100644
--- a/internal/fusefrontend/args.go
+++ b/internal/fusefrontend/args.go
@@ -1,7 +1,7 @@
package fusefrontend
import (
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
// Args is a container for arguments that are passed from main() to fusefrontend
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index 8eee0f8..03eccd7 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -16,8 +16,8 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
@@ -26,7 +26,7 @@ import (
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
)
-// File implements the go-fuse v2 API (github.com/hanwen/go-fuse/v2/fs)
+// File implements the go-fuse v2 API (github.com/hanwen/go-fuse/v3/fs)
type File struct {
fd *os.File
// Has Release() already been called on this file? This also means that the
diff --git a/internal/fusefrontend/file_allocate_truncate.go b/internal/fusefrontend/file_allocate_truncate.go
index 19b7697..14dfdd0 100644
--- a/internal/fusefrontend/file_allocate_truncate.go
+++ b/internal/fusefrontend/file_allocate_truncate.go
@@ -13,7 +13,7 @@ import (
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
diff --git a/internal/fusefrontend/file_api_check.go b/internal/fusefrontend/file_api_check.go
index 019e97f..0416ab1 100644
--- a/internal/fusefrontend/file_api_check.go
+++ b/internal/fusefrontend/file_api_check.go
@@ -1,7 +1,7 @@
package fusefrontend
import (
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
)
// Check that we have implemented the fs.File* interfaces
diff --git a/internal/fusefrontend/file_dir_ops.go b/internal/fusefrontend/file_dir_ops.go
index 683da87..772eed5 100644
--- a/internal/fusefrontend/file_dir_ops.go
+++ b/internal/fusefrontend/file_dir_ops.go
@@ -4,8 +4,8 @@ import (
"context"
"syscall"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
diff --git a/internal/fusefrontend/file_holes.go b/internal/fusefrontend/file_holes.go
index fc58898..e63d534 100644
--- a/internal/fusefrontend/file_holes.go
+++ b/internal/fusefrontend/file_holes.go
@@ -7,7 +7,7 @@ import (
"runtime"
"syscall"
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
)
diff --git a/internal/fusefrontend/file_setattr.go b/internal/fusefrontend/file_setattr.go
index fe4bc47..5afa89b 100644
--- a/internal/fusefrontend/file_setattr.go
+++ b/internal/fusefrontend/file_setattr.go
@@ -4,8 +4,8 @@ import (
"context"
"syscall"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
diff --git a/internal/fusefrontend/node.go b/internal/fusefrontend/node.go
index 4f6ae45..ec0a14e 100644
--- a/internal/fusefrontend/node.go
+++ b/internal/fusefrontend/node.go
@@ -6,8 +6,8 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
diff --git a/internal/fusefrontend/node_api_check.go b/internal/fusefrontend/node_api_check.go
index 37d4293..e3e7fb0 100644
--- a/internal/fusefrontend/node_api_check.go
+++ b/internal/fusefrontend/node_api_check.go
@@ -1,7 +1,7 @@
package fusefrontend
import (
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
)
// Check that we have implemented the fs.Node* interfaces
diff --git a/internal/fusefrontend/node_dir_ops.go b/internal/fusefrontend/node_dir_ops.go
index 97327ce..fc90c05 100644
--- a/internal/fusefrontend/node_dir_ops.go
+++ b/internal/fusefrontend/node_dir_ops.go
@@ -9,8 +9,8 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
@@ -34,7 +34,7 @@ func haveDsstore(entries []fuse.DirEntry) bool {
// should be a handle to the parent directory, cName is the name of the new
// directory and mode specifies the access permissions to use.
// If DeterministicNames is set, the diriv file is NOT created.
-func (n *Node) mkdirWithIv(dirfd int, cName string, mode uint32, context *fuse.Context) error {
+func (n *Node) mkdirWithIv(dirfd int, cName string, mode uint32, context *fuse.Caller) error {
rn := n.rootNode()
if rn.args.DeterministicNames {
@@ -77,7 +77,7 @@ func (n *Node) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.En
defer syscall.Close(dirfd)
rn := n.rootNode()
- var context *fuse.Context
+ var context *fuse.Caller
if rn.args.PreserveOwner {
context = toFuseCtx(ctx)
}
diff --git a/internal/fusefrontend/node_helpers.go b/internal/fusefrontend/node_helpers.go
index 3102275..43a8220 100644
--- a/internal/fusefrontend/node_helpers.go
+++ b/internal/fusefrontend/node_helpers.go
@@ -4,25 +4,23 @@ import (
"context"
"syscall"
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
)
-// toFuseCtx tries to extract a fuse.Context from a generic context.Context.
-func toFuseCtx(ctx context.Context) (ctx2 *fuse.Context) {
+// toFuseCtx tries to extract a fuse.Caller from a generic context.Context.
+func toFuseCtx(ctx context.Context) *fuse.Caller {
if ctx == nil {
return nil
}
if caller, ok := fuse.FromContext(ctx); ok {
- ctx2 = &fuse.Context{
- Caller: *caller,
- }
+ return &caller
}
- return ctx2
+ return nil
}
// toNode casts a generic fs.InodeEmbedder into *Node. Also handles *RootNode
diff --git a/internal/fusefrontend/node_open_create.go b/internal/fusefrontend/node_open_create.go
index 622d5dc..9825884 100644
--- a/internal/fusefrontend/node_open_create.go
+++ b/internal/fusefrontend/node_open_create.go
@@ -5,8 +5,8 @@ import (
"os"
"syscall"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
diff --git a/internal/fusefrontend/node_prepare_syscall.go b/internal/fusefrontend/node_prepare_syscall.go
index 03194df..5e439bf 100644
--- a/internal/fusefrontend/node_prepare_syscall.go
+++ b/internal/fusefrontend/node_prepare_syscall.go
@@ -6,7 +6,7 @@ import (
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
)
diff --git a/internal/fusefrontend/node_xattr.go b/internal/fusefrontend/node_xattr.go
index cbb0c37..0640943 100644
--- a/internal/fusefrontend/node_xattr.go
+++ b/internal/fusefrontend/node_xattr.go
@@ -7,7 +7,7 @@ import (
"strings"
"syscall"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
)
@@ -90,7 +90,7 @@ func (n *Node) Setxattr(ctx context.Context, attr string, data []byte, flags uin
// ACLs are passed through without encryption
if isAcl(attr) {
// result of setting an acl depends on the user doing it
- var context *fuse.Context
+ var context *fuse.Caller
if rn.args.PreserveOwner {
context = toFuseCtx(ctx)
}
diff --git a/internal/fusefrontend/node_xattr_darwin.go b/internal/fusefrontend/node_xattr_darwin.go
index 1d25f3d..420084f 100644
--- a/internal/fusefrontend/node_xattr_darwin.go
+++ b/internal/fusefrontend/node_xattr_darwin.go
@@ -5,8 +5,8 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
)
@@ -44,7 +44,7 @@ func (n *Node) getXAttr(cAttr string) (out []byte, errno syscall.Errno) {
return cData, 0
}
-func (n *Node) setXAttr(context *fuse.Context, cAttr string, cData []byte, flags uint32) (errno syscall.Errno) {
+func (n *Node) setXAttr(context *fuse.Caller, cAttr string, cData []byte, flags uint32) (errno syscall.Errno) {
dirfd, cName, errno := n.prepareAtSyscallMyself()
if errno != 0 {
return
diff --git a/internal/fusefrontend/node_xattr_freebsd.go b/internal/fusefrontend/node_xattr_freebsd.go
index 9698283..3f9c577 100644
--- a/internal/fusefrontend/node_xattr_freebsd.go
+++ b/internal/fusefrontend/node_xattr_freebsd.go
@@ -3,7 +3,7 @@ package fusefrontend
import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
const noSuchAttributeError = unix.ENOATTR
@@ -17,7 +17,7 @@ func (n *Node) getXAttr(cAttr string) (out []byte, errno unix.Errno) {
return nil, unix.EOPNOTSUPP
}
-func (n *Node) setXAttr(context *fuse.Context, cAttr string, cData []byte, flags uint32) (errno unix.Errno) {
+func (n *Node) setXAttr(context *fuse.Caller, cAttr string, cData []byte, flags uint32) (errno unix.Errno) {
// TODO
return unix.EOPNOTSUPP
}
diff --git a/internal/fusefrontend/node_xattr_linux.go b/internal/fusefrontend/node_xattr_linux.go
index 9964212..b1f8f39 100644
--- a/internal/fusefrontend/node_xattr_linux.go
+++ b/internal/fusefrontend/node_xattr_linux.go
@@ -6,8 +6,8 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
)
@@ -34,7 +34,7 @@ func (n *Node) getXAttr(cAttr string) (out []byte, errno syscall.Errno) {
return cData, 0
}
-func (n *Node) setXAttr(context *fuse.Context, cAttr string, cData []byte, flags uint32) (errno syscall.Errno) {
+func (n *Node) setXAttr(context *fuse.Caller, cAttr string, cData []byte, flags uint32) (errno syscall.Errno) {
dirfd, cName, errno := n.prepareAtSyscallMyself()
if errno != 0 {
return
diff --git a/internal/fusefrontend/prepare_syscall_test.go b/internal/fusefrontend/prepare_syscall_test.go
index 5945720..fb86592 100644
--- a/internal/fusefrontend/prepare_syscall_test.go
+++ b/internal/fusefrontend/prepare_syscall_test.go
@@ -8,7 +8,7 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
)
diff --git a/internal/fusefrontend/statx_linux.go b/internal/fusefrontend/statx_linux.go
index f9f87cf..3afaa05 100644
--- a/internal/fusefrontend/statx_linux.go
+++ b/internal/fusefrontend/statx_linux.go
@@ -4,8 +4,8 @@ import (
"context"
"syscall"
- "github.com/hanwen/go-fuse/v2/fs"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fs"
+ "github.com/hanwen/go-fuse/v3/fuse"
"golang.org/x/sys/unix"
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
diff --git a/internal/fusefrontend/xattr_unit_test.go b/internal/fusefrontend/xattr_unit_test.go
index 7d8e32e..379b0dd 100644
--- a/internal/fusefrontend/xattr_unit_test.go
+++ b/internal/fusefrontend/xattr_unit_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"time"
- "github.com/hanwen/go-fuse/v2/fs"
+ "github.com/hanwen/go-fuse/v3/fs"
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"