aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat
diff options
context:
space:
mode:
authorJakob Unterwurzacher2026-11-19 21:14:58 +0100
committerJakob Unterwurzacher2026-11-19 21:25:56 +0100
commit173e5056ef8beaa461c5a6665b75e1d97503c5ac (patch)
treebfff9a1b18a97bac7ee8b6c4f05d2d9b9fd2cc58 /internal/syscallcompat
parent52c4864d849cbbb76d49d1a908025b77c7246bda (diff)
go.mod: upgrade to go-fuse v3 (current master 1ffd5bd2bfc64)HEADmaster
go-fuse master is now github.com/hanwen/go-fuse/v3. Changes needed: * Change the import path, also in build.bash and version.go, which look up the go-fuse module version. * fuse.Context is gone, and fuse.FromContext() now returns a fuse.Caller value. Caller has the same Owner and Pid fields, so use *fuse.Caller in place of *fuse.Context. * fuse.Status is replaced by syscall.Errno, so ReadResult.Bytes() returns an Errno now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/syscallcompat')
-rw-r--r--internal/syscallcompat/asuser.go10
-rw-r--r--internal/syscallcompat/asuser_darwin.go4
-rw-r--r--internal/syscallcompat/asuser_freebsd.go4
-rw-r--r--internal/syscallcompat/asuser_linux.go4
-rw-r--r--internal/syscallcompat/getdents_linux.go2
-rw-r--r--internal/syscallcompat/getdents_other.go2
-rw-r--r--internal/syscallcompat/getdents_test.go2
-rw-r--r--internal/syscallcompat/sys_darwin.go2
-rw-r--r--internal/syscallcompat/sys_freebsd.go4
-rw-r--r--internal/syscallcompat/sys_linux.go4
10 files changed, 19 insertions, 19 deletions
diff --git a/internal/syscallcompat/asuser.go b/internal/syscallcompat/asuser.go
index 0c083ec..e924587 100644
--- a/internal/syscallcompat/asuser.go
+++ b/internal/syscallcompat/asuser.go
@@ -3,7 +3,7 @@ package syscallcompat
import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
// OpenatUser runs the Openat syscall in the context of a different user.
@@ -12,7 +12,7 @@ import (
//
// If `context` is nil, this function behaves like ordinary Openat (no
// user switching).
-func OpenatUser(dirfd int, path string, flags int, mode uint32, context *fuse.Context) (fd int, err error) {
+func OpenatUser(dirfd int, path string, flags int, mode uint32, context *fuse.Caller) (fd int, err error) {
f := func() (int, error) {
return Openat(dirfd, path, flags, mode)
}
@@ -23,7 +23,7 @@ func OpenatUser(dirfd int, path string, flags int, mode uint32, context *fuse.Co
// If `context` is nil, this function behaves like ordinary Mknodat.
//
// See OpenatUser() for how this works.
-func MknodatUser(dirfd int, path string, mode uint32, dev int, context *fuse.Context) (err error) {
+func MknodatUser(dirfd int, path string, mode uint32, dev int, context *fuse.Caller) (err error) {
f := func() (int, error) {
err := Mknodat(dirfd, path, mode, dev)
return -1, err
@@ -36,7 +36,7 @@ func MknodatUser(dirfd int, path string, mode uint32, dev int, context *fuse.Con
// If `context` is nil, this function behaves like ordinary Symlinkat.
//
// See OpenatUser() for how this works.
-func SymlinkatUser(oldpath string, newdirfd int, newpath string, context *fuse.Context) (err error) {
+func SymlinkatUser(oldpath string, newdirfd int, newpath string, context *fuse.Caller) (err error) {
f := func() (int, error) {
err := unix.Symlinkat(oldpath, newdirfd, newpath)
return -1, err
@@ -49,7 +49,7 @@ func SymlinkatUser(oldpath string, newdirfd int, newpath string, context *fuse.C
// If `context` is nil, this function behaves like ordinary Mkdirat.
//
// See OpenatUser() for how this works.
-func MkdiratUser(dirfd int, path string, mode uint32, context *fuse.Context) (err error) {
+func MkdiratUser(dirfd int, path string, mode uint32, context *fuse.Caller) (err error) {
f := func() (int, error) {
err := unix.Mkdirat(dirfd, path, mode)
return -1, err
diff --git a/internal/syscallcompat/asuser_darwin.go b/internal/syscallcompat/asuser_darwin.go
index 5da2782..70a1da8 100644
--- a/internal/syscallcompat/asuser_darwin.go
+++ b/internal/syscallcompat/asuser_darwin.go
@@ -4,14 +4,14 @@ import (
"runtime"
"syscall"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
// asUser runs `f()` under the effective uid, gid, groups specified
// in `context`.
//
// If `context` is nil, `f()` is executed directly without switching user id.
-func asUser(f func() (int, error), context *fuse.Context) (int, error) {
+func asUser(f func() (int, error), context *fuse.Caller) (int, error) {
if context == nil {
return f()
}
diff --git a/internal/syscallcompat/asuser_freebsd.go b/internal/syscallcompat/asuser_freebsd.go
index dfa8e18..4d349be 100644
--- a/internal/syscallcompat/asuser_freebsd.go
+++ b/internal/syscallcompat/asuser_freebsd.go
@@ -3,7 +3,7 @@ package syscallcompat
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/internal/tlog"
)
@@ -15,7 +15,7 @@ import (
//
// FreeBSD does not support changing uid/gid per thread. If context is not nil,
// an error is returned.
-func asUser(f func() (int, error), context *fuse.Context) (int, error) {
+func asUser(f func() (int, error), context *fuse.Caller) (int, error) {
if context == nil {
return f()
}
diff --git a/internal/syscallcompat/asuser_linux.go b/internal/syscallcompat/asuser_linux.go
index 39e3ff2..4e11973 100644
--- a/internal/syscallcompat/asuser_linux.go
+++ b/internal/syscallcompat/asuser_linux.go
@@ -7,14 +7,14 @@ import (
"strconv"
"strings"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
// asUser runs `f()` under the effective uid, gid, groups specified
// in `context`.
//
// If `context` is nil, `f()` is executed directly without switching user id.
-func asUser(f func() (int, error), context *fuse.Context) (int, error) {
+func asUser(f func() (int, error), context *fuse.Caller) (int, error) {
if context == nil {
return f()
}
diff --git a/internal/syscallcompat/getdents_linux.go b/internal/syscallcompat/getdents_linux.go
index da3868f..f3a6b83 100644
--- a/internal/syscallcompat/getdents_linux.go
+++ b/internal/syscallcompat/getdents_linux.go
@@ -15,7 +15,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/internal/tlog"
)
diff --git a/internal/syscallcompat/getdents_other.go b/internal/syscallcompat/getdents_other.go
index 1ed5ecf..650861c 100644
--- a/internal/syscallcompat/getdents_other.go
+++ b/internal/syscallcompat/getdents_other.go
@@ -6,7 +6,7 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
func fillDirEntries(fd int, names []string) ([]fuse.DirEntry, error) {
diff --git a/internal/syscallcompat/getdents_test.go b/internal/syscallcompat/getdents_test.go
index c9e6a99..8231d59 100644
--- a/internal/syscallcompat/getdents_test.go
+++ b/internal/syscallcompat/getdents_test.go
@@ -12,7 +12,7 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
var emulate = false
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go
index 07eb30a..7d39071 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -9,7 +9,7 @@ import (
"golang.org/x/sys/unix"
- "github.com/hanwen/go-fuse/v2/fuse"
+ "github.com/hanwen/go-fuse/v3/fuse"
)
const (
diff --git a/internal/syscallcompat/sys_freebsd.go b/internal/syscallcompat/sys_freebsd.go
index 9c8c9e8..626c8b2 100644
--- a/internal/syscallcompat/sys_freebsd.go
+++ b/internal/syscallcompat/sys_freebsd.go
@@ -6,7 +6,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/internal/tlog"
)
@@ -81,7 +81,7 @@ func FchmodatNofollow(dirfd int, path string, mode uint32) (err error) {
// the operation (see fuse-xfstests generic/375).
//
// If `context` is nil, this function behaves like ordinary Lsetxattr.
-func LsetxattrUser(path string, attr string, data []byte, flags int, context *fuse.Context) (err error) {
+func LsetxattrUser(path string, attr string, data []byte, flags int, context *fuse.Caller) (err error) {
f := func() (int, error) {
err := unix.Lsetxattr(path, attr, data, flags)
return -1, err
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index 91f865a..dad7187 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -9,7 +9,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/internal/tlog"
)
@@ -135,7 +135,7 @@ func FchmodatNofollow(dirfd int, path string, mode uint32) (err error) {
// the operation (see fuse-xfstests generic/375).
//
// If `context` is nil, this function behaves like ordinary Lsetxattr.
-func LsetxattrUser(path string, attr string, data []byte, flags int, context *fuse.Context) (err error) {
+func LsetxattrUser(path string, attr string, data []byte, flags int, context *fuse.Caller) (err error) {
f := func() (int, error) {
err := unix.Lsetxattr(path, attr, data, flags)
return -1, err