Age | Commit message (Collapse) | Author |
|
The days of GOPATH are over. Also, use the fsstress path
that "sudo make install" in xfstests uses per default.
|
|
|
|
This file was only compiled for arm because
( https://pkg.go.dev/cmd/go#hdr-Build_constraints ):
If a file's
name, after stripping the extension and a possible _test suffix,
matches any of the following patterns:
*_GOOS
*_GOARCH
*_GOOS_GOARCH
(example: source_windows_amd64.go) where GOOS and GOARCH
represent any known operating system and architecture values
respectively, then the file is considered to have an implicit
build constraint requiring those terms (in addition to any
explicit constraints in the file).
Error was:
+ GOOS=linux
+ GOARCH=386
+ build
+ go build -tags without_openssl -o /dev/null
# github.com/rfjakob/gocryptfs/v2/internal/syscallcompat
Error: internal/syscallcompat/asuser_linux.go:41:8: undefined: Setregid
Error: internal/syscallcompat/asuser_linux.go:47:8: undefined: Setreuid
Error: internal/syscallcompat/thread_credentials_linux.go:29:10: undefined: setgroups
Error: internal/syscallcompat/thread_credentials_linux.go:36:9: undefined: setgroups
Error: internal/syscallcompat/thread_credentials_linux.go:49:9: undefined: Setregid
Error: internal/syscallcompat/thread_credentials_linux.go:57:9: undefined: Setreuid
Rename the file to fix the problem. And add a comment about why this file exists.
Fixes https://github.com/rfjakob/gocryptfs/issues/907
|
|
https://github.com/rfjakob/gocryptfs/issues/907
|
|
The old link says:
> The Go wiki on GitHub has moved to go.dev (#61940).
>
> Try https://go.dev/wiki/GoArm
|
|
|
|
Because if we have them in git, we get this:
$ go install github.com/rfjakob/gocryptfs/v2@latest
go: downloading github.com/rfjakob/gocryptfs/v2 v2.5.2
go: github.com/rfjakob/gocryptfs/v2@latest: create zip: tests/fsck/malleable_base64/27AG8t-XZH7G9ou2OSD_z
g: malformed file path "tests/fsck/malleable_base64/27AG8t-XZH7G9ou2OSD_z\ng": invalid char '\n'
g: malformed file path "tests/fsck/malleable_base64/27AG8t-XZH7G9ou2OSD_z\rg": invalid char '\r'
Fixes: https://github.com/rfjakob/gocryptfs/issues/904
Relates-to: https://github.com/golang/go/issues/28001
|
|
Essentially a port of
https://github.com/hanwen/go-fuse/commit/531a68551e40e7303e94b53fb3792e6dfb28d15a .
This fixes
panic: interface conversion: *fs.dirStreamAsFile is not fs.FileGetattrer: missing method Getattr
goroutine 20 [running]:
github.com/rfjakob/gocryptfs/v2/internal/fusefrontend.(*Node).Getattr(0x55a7ac9d9090?, {0x55a7ac85a4d8, 0xc0013401c8}, {0x55a7ac80eb40?, 0xc0013401b0}, 0xc000586938)
github.com/rfjakob/gocryptfs/v2/internal/fusefrontend/node.go:74 +0x22c
github.com/hanwen/go-fuse/v2/fs.(*rawBridge).getattr(0xc0000b6180, {0x55a7ac85a4d8, 0xc0013401c8}, 0xc0010ea160, {0x55a7ac80eb40?, 0xc0013401b0}, 0xc000586938)
github.com/hanwen/go-fuse/v2@v2.7.2/fs/bridge.go:569 +0x9b
[...]
which is a bug exposed by a go-fuse update.
Fixes https://github.com/rfjakob/gocryptfs/issues/897
|
|
GO111MODULE is default on with Go 1.16, same version that gained
darwin/arm64 support.
We only support Go 1.19 and up, so drop the kludges.
|
|
|
|
https://github.com/rfjakob/gocryptfs/issues/893
|
|
go-libaegis does not support Go 1.18, Ubuntu 22.04 is old,
drop it.
|
|
We have been getting
/usr/bin/fusermount3: too many FUSE filesystems mounted; mount_max=N can be set in /etc/fuse.conf
fs.Mount failed: fusermount exited with code 256
every now and then. I wonder why that is.
|
|
I did NOT upgrade to x/crypto@v0.35.0 yet because this
requires go 1.23.0
(https://go.googlesource.com/crypto/+/89ff08d67c4d79f9ac619aaf1f7388888798651f)
and our github workflow tests go 1.18.x and newer.
|
|
Now that we have our own wrappers for Setreuid and friends, we can upgrade.
$ go get golang.org/x/sys
go: upgraded golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a => v0.30.0
$ go mod tidy
|
|
|
|
x/sys v0.1.0 (https://github.com/golang/sys/commit/d0df966e6959f00dc1c74363e537872647352d51)
breaks our usecase. Switch to our own wrappers.
Relates-to: https://github.com/rfjakob/gocryptfs/issues/892
Relates-to: https://github.com/rfjakob/gocryptfs/issues/893
|
|
|
|
It's only used there, so move it.
|
|
As with the other files, include "linux" because the code only
builds on linux
renamed: internal/syscallcompat/thread_credentials.go -> internal/syscallcompat/thread_credentials_linux.go
renamed: internal/syscallcompat/thread_credentials_368_arm.go -> internal/syscallcompat/thread_credentials_linux_368_arm.go
renamed: internal/syscallcompat/thread_credentials_other.go -> internal/syscallcompat/thread_credentials_linux_other.go
|
|
|
|
|
|
Both work with
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
but break with
golang.org/x/sys v0.30.0
https://github.com/rfjakob/gocryptfs/issues/893
https://github.com/rfjakob/gocryptfs/issues/892
|
|
I will add more tests for https://github.com/rfjakob/gocryptfs/issues/893
soon, these will also use DefaultPlainDir.
|
|
Will use those later.
|
|
|
|
Private copies of per-thread Setreuid/Setegid/Setgroups.
https://github.com/rfjakob/gocryptfs/issues/893
https://github.com/rfjakob/gocryptfs/issues/892
|
|
Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
|
|
|
|
|
The commit
https://github.com/golang/sys/commit/d0df966e6959f00dc1c74363e537872647352d51
unix: support all Setuid/Setgid and related syscalls on Linux"
changed the behavoir of Setreuid() and Setregid() to affect the whole
process instead of just the current thread.
This broke syscallcompat.asUser() which uses runtime.LockOSThread()
plus Setreuid().
Partially revert 08b6ed16919b27a12a3228b17689d5d6d69eb10e bringing
us back to a golang.org/x/sys version with the old behavoir.
Fixes https://github.com/rfjakob/gocryptfs/issues/893
|
|
https://github.com/rfjakob/gocryptfs/issues/893
|
|
|
|
|
|
|
|
|
|
|
|
Darwin does not have Stat_t.mtim:
+ go test -c -tags without_openssl -o /dev/null github.com/rfjakob/gocryptfs/v2/tests/reverse
Error: tests/reverse/correctness_test.go:407:15: name_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim)
Error: tests/reverse/correctness_test.go:407:37: long_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim)
Error: tests/reverse/correctness_test.go:410:15: name_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim)
Error: tests/reverse/correctness_test.go:410:37: long_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim)
Error: tests/reverse/correctness_test.go:424:16: diriv_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim)
Error: tests/reverse/correctness_test.go:424:42: workdirA_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim)
Error: tests/reverse/correctness_test.go:427:16: diriv_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim)
Error: tests/reverse/correctness_test.go:427:42: workdirA_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim)
Switch to os.Stat.
|
|
This problem potentially causes extra disk usage for sparse files
but is otherwise harmless.
Skip the test for now.
|
|
Closes https://github.com/rfjakob/gocryptfs/pull/883
Closes https://github.com/rfjakob/gocryptfs/security/dependabot/10
|
|
With inode number reuse and hard links, we could have returned
wrong data for gocryptfs.diriv and gocryptfs.xyz.longname files, respectively
(https://github.com/rfjakob/gocryptfs/issues/802).
Now that this is fixed, ensure that rsync and similar tools pick up the new
correct files by advancing mtime and ctime by 10 seconds, which should be more
than any filesytems' timestamp granularity (FAT32 has 2 seconds).
|
|
Will be used in a new test in the next commit.
|
|
|
|
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
|
|
This is not a real leak:
fd leak in test process? before, after:
[0r=/dev/null 3r=/proc/940141/fd 5rw=anon_inode:[eventfd] (filtered: pipe:[2454797], pipe:[2454797], anon_inode:[eventpoll])]
[0r=/dev/null 3r=/proc/940141/fd 5rw=anon_inode:[eventfd] 12rw=anon_inode:[pidfd] (filtered: pipe:[2454797], pipe:[2454797], anon_inode:[eventpoll], pipe:[2460158])]
Ignore pidfd.
|
|
Turns out at least the tests depended on the old
behavoir.
Fixes d5bd98eb3f4cbfb8dd9d0b2eb64dbff69c3c88b1
|
|
Using the same "-extpass" or "-passfile" for both old
and new password makes little sense, and it causes real
problems as seen here: https://github.com/rfjakob/gocryptfs/discussions/882
I hope nobody depends on this or I'll have to revert.
Fixes https://github.com/rfjakob/gocryptfs/issues/287
Fixes https://github.com/rfjakob/gocryptfs/discussions/882
|
|
|
|
We don't know the exact value as we only read 2kiB.
Relates-to: https://github.com/rfjakob/gocryptfs/discussions/882
|
|
Now that https://github.com/hanwen/go-fuse/issues/399 has
landed we can report an inode number for the root node.
Fixes https://github.com/rfjakob/gocryptfs/issues/580
|