go mod: declare module version v2
Our git version is v2+ for some time now, but go.mod still declared v1. Hopefully making both match makes https://pkg.go.dev/github.com/rfjakob/gocryptfs/v2 work. All the import paths have been fixed like this: find . -name \*.go | xargs sed -i s%github.com/rfjakob/gocryptfs/%github.com/rfjakob/gocryptfs/v2/%
This commit is contained in:
parent
c9abfc8f06
commit
69d88505fd
10
cli_args.go
10
cli_args.go
@ -4,7 +4,7 @@ import (
|
|||||||
// Should be initialized before anything else.
|
// Should be initialized before anything else.
|
||||||
// This import line MUST be in the alphabetically first source code file of
|
// This import line MUST be in the alphabetically first source code file of
|
||||||
// package main!
|
// package main!
|
||||||
_ "github.com/rfjakob/gocryptfs/internal/ensurefds012"
|
_ "github.com/rfjakob/gocryptfs/v2/internal/ensurefds012"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
@ -18,10 +18,10 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// argContainer stores the parsed CLI options and arguments
|
// argContainer stores the parsed CLI options and arguments
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestPrefixOArgs checks that the "-o x,y,z" parsing works correctly.
|
// TestPrefixOArgs checks that the "-o x,y,z" parsing works correctly.
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/contrib/findholes/holes"
|
"github.com/rfjakob/gocryptfs/v2/contrib/findholes/holes"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Small tool to try to debug unix.Getdents problems on CIFS mounts
|
Small tool to try to debug unix.Getdents problems on CIFS mounts
|
||||||
( https://github.com/rfjakob/gocryptfs/issues/483 )
|
( https://github.com/rfjakob/gocryptfs/v2/issues/483 )
|
||||||
|
|
||||||
Example output:
|
Example output:
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Small tool to try to debug unix.Getdents problems on CIFS mounts
|
Small tool to try to debug unix.Getdents problems on CIFS mounts
|
||||||
( https://github.com/rfjakob/gocryptfs/issues/483 )
|
( https://github.com/rfjakob/gocryptfs/v2/issues/483 )
|
||||||
|
|
||||||
Example output:
|
Example output:
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The child sends us USR1 if the mount was successful. Exit with error code
|
// The child sends us USR1 if the mount was successful. Exit with error code
|
||||||
|
8
fsck.go
8
fsck.go
@ -14,10 +14,10 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fusefrontend"
|
"github.com/rfjakob/gocryptfs/v2/internal/fusefrontend"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type fsckObj struct {
|
type fsckObj struct {
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/rfjakob/gocryptfs
|
module github.com/rfjakob/gocryptfs/v2
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/ctlsock"
|
"github.com/rfjakob/gocryptfs/v2/ctlsock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func decryptPaths(socketPath string, sep0 bool) {
|
func decryptPaths(socketPath string, sep0 bool) {
|
||||||
|
@ -8,13 +8,13 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fido2"
|
"github.com/rfjakob/gocryptfs/v2/internal/fido2"
|
||||||
"github.com/rfjakob/gocryptfs/internal/readpassword"
|
"github.com/rfjakob/gocryptfs/v2/internal/readpassword"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GitVersion is the gocryptfs version according to git, set by build.bash
|
// GitVersion is the gocryptfs version according to git, set by build.bash
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAesgcmXray(t *testing.T) {
|
func TestAesgcmXray(t *testing.T) {
|
||||||
|
2
help.go
2
help.go
@ -3,7 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tUsage = "" +
|
const tUsage = "" +
|
||||||
|
8
info.go
8
info.go
@ -7,10 +7,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// info pretty-prints the contents of the config file at "filename" for human
|
// info pretty-prints the contents of the config file at "filename" for human
|
||||||
|
16
init_dir.go
16
init_dir.go
@ -8,14 +8,14 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fido2"
|
"github.com/rfjakob/gocryptfs/v2/internal/fido2"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/readpassword"
|
"github.com/rfjakob/gocryptfs/v2/internal/readpassword"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// isEmptyDir checks if "dir" exists and is an empty directory.
|
// isEmptyDir checks if "dir" exists and is an empty directory.
|
||||||
|
@ -12,10 +12,10 @@ import (
|
|||||||
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -223,10 +223,10 @@ func Load(filename string) (*ConfFile, error) {
|
|||||||
The filesystem was created by gocryptfs v0.6 or earlier. This version of
|
The filesystem was created by gocryptfs v0.6 or earlier. This version of
|
||||||
gocryptfs can no longer mount the filesystem.
|
gocryptfs can no longer mount the filesystem.
|
||||||
Please download gocryptfs v0.11 and upgrade your filesystem,
|
Please download gocryptfs v0.11 and upgrade your filesystem,
|
||||||
see https://github.com/rfjakob/gocryptfs/wiki/Upgrading for instructions.
|
see https://github.com/rfjakob/gocryptfs/v2/wiki/Upgrading for instructions.
|
||||||
|
|
||||||
If you have trouble upgrading, join the discussion at
|
If you have trouble upgrading, join the discussion at
|
||||||
https://github.com/rfjakob/gocryptfs/issues/29 .
|
https://github.com/rfjakob/gocryptfs/v2/issues/29 .
|
||||||
|
|
||||||
`+tlog.ColorReset)
|
`+tlog.ColorReset)
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ func (cf *ConfFile) WriteFile() error {
|
|||||||
err = fd.Sync()
|
err = fd.Sync()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// This can happen on network drives: FRITZ.NAS mounted on MacOS returns
|
// This can happen on network drives: FRITZ.NAS mounted on MacOS returns
|
||||||
// "operation not supported": https://github.com/rfjakob/gocryptfs/issues/390
|
// "operation not supported": https://github.com/rfjakob/gocryptfs/v2/issues/390
|
||||||
tlog.Warn.Printf("Warning: fsync failed: %v", err)
|
tlog.Warn.Printf("Warning: fsync failed: %v", err)
|
||||||
// Try sync instead
|
// Try sync instead
|
||||||
syscall.Sync()
|
syscall.Sync()
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testPw = []byte("test")
|
var testPw = []byte("test")
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/scrypt"
|
"golang.org/x/crypto/scrypt"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -17,7 +17,7 @@ BenchmarkScrypt14-2 20 92561590 ns/op ... 92ms
|
|||||||
BenchmarkScrypt15-2 10 183971593 ns/op
|
BenchmarkScrypt15-2 10 183971593 ns/op
|
||||||
BenchmarkScrypt16-2 3 368506365 ns/op
|
BenchmarkScrypt16-2 3 368506365 ns/op
|
||||||
BenchmarkScrypt17-2 2 755502608 ns/op ... 755ms
|
BenchmarkScrypt17-2 2 755502608 ns/op ... 755ms
|
||||||
ok github.com/rfjakob/gocryptfs/cryptfs 18.772s
|
ok github.com/rfjakob/gocryptfs/v2/cryptfs 18.772s
|
||||||
*/
|
*/
|
||||||
|
|
||||||
func benchmarkScryptN(n int, b *testing.B) {
|
func benchmarkScryptN(n int, b *testing.B) {
|
||||||
|
@ -12,9 +12,9 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NonceMode determines how nonces are created.
|
// NonceMode determines how nonces are created.
|
||||||
@ -179,7 +179,7 @@ func (be *ContentEnc) DecryptBlock(ciphertext []byte, blockNo uint64, fileID []b
|
|||||||
nonce := ciphertext[:be.cryptoCore.IVLen]
|
nonce := ciphertext[:be.cryptoCore.IVLen]
|
||||||
if bytes.Equal(nonce, be.allZeroNonce) {
|
if bytes.Equal(nonce, be.allZeroNonce) {
|
||||||
// Bug in tmpfs?
|
// Bug in tmpfs?
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/56
|
// https://github.com/rfjakob/gocryptfs/v2/issues/56
|
||||||
// http://www.spinics.net/lists/kernel/msg2370127.html
|
// http://www.spinics.net/lists/kernel/msg2370127.html
|
||||||
return nil, errors.New("all-zero nonce")
|
return nil, errors.New("all-zero nonce")
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package contentenc
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testRange struct {
|
type testRange struct {
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -3,7 +3,7 @@ package contentenc
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Contentenc methods that translate offsets between ciphertext and plaintext
|
// Contentenc methods that translate offsets between ciphertext and plaintext
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestSizeToSize tests CipherSizeToPlainSize and PlainSizeToCipherSize
|
// TestSizeToSize tests CipherSizeToPlainSize and PlainSizeToCipherSize
|
||||||
|
@ -12,9 +12,9 @@ import (
|
|||||||
|
|
||||||
"github.com/rfjakob/eme"
|
"github.com/rfjakob/eme"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/siv_aead"
|
"github.com/rfjakob/gocryptfs/v2/internal/siv_aead"
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -3,7 +3,7 @@ package cryptocore
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// "New" should accept at least these param combinations
|
// "New" should accept at least these param combinations
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/ctlsock"
|
"github.com/rfjakob/gocryptfs/v2/ctlsock"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Interface should be implemented by fusefrontend[_reverse]
|
// Interface should be implemented by fusefrontend[_reverse]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
//
|
//
|
||||||
// Use like this:
|
// Use like this:
|
||||||
//
|
//
|
||||||
// import _ "github.com/rfjakob/gocryptfs/internal/ensurefds012"
|
// import _ "github.com/rfjakob/gocryptfs/v2/internal/ensurefds012"
|
||||||
//
|
//
|
||||||
// The import line MUST be in the alphabitcally first source code file of
|
// The import line MUST be in the alphabitcally first source code file of
|
||||||
// package main!
|
// package main!
|
||||||
@ -25,14 +25,14 @@
|
|||||||
// l-wx------. 1 jakob jakob 64 Jan 5 15:54 3 -> /dev/null
|
// l-wx------. 1 jakob jakob 64 Jan 5 15:54 3 -> /dev/null
|
||||||
// lrwx------. 1 jakob jakob 64 Jan 5 15:54 4 -> 'anon_inode:[eventpoll]'
|
// lrwx------. 1 jakob jakob 64 Jan 5 15:54 4 -> 'anon_inode:[eventpoll]'
|
||||||
//
|
//
|
||||||
// See https://github.com/rfjakob/gocryptfs/issues/320 for details.
|
// See https://github.com/rfjakob/gocryptfs/v2/issues/320 for details.
|
||||||
package ensurefds012
|
package ensurefds012
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type fidoCommand int
|
type fidoCommand int
|
||||||
|
@ -42,7 +42,7 @@ type Args struct {
|
|||||||
// Suid is true if the filesystem has been mounted with the "-suid" flag.
|
// Suid is true if the filesystem has been mounted with the "-suid" flag.
|
||||||
// If it is false, we can ignore the GETXATTR "security.capability" calls,
|
// If it is false, we can ignore the GETXATTR "security.capability" calls,
|
||||||
// which are a performance problem for writes. See
|
// which are a performance problem for writes. See
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/515 for details.
|
// https://github.com/rfjakob/gocryptfs/v2/issues/515 for details.
|
||||||
Suid bool
|
Suid bool
|
||||||
// Enable the FUSE kernel_cache option
|
// Enable the FUSE kernel_cache option
|
||||||
KernelCache bool
|
KernelCache bool
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/ctlsocksrv"
|
"github.com/rfjakob/gocryptfs/v2/internal/ctlsocksrv"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ ctlsocksrv.Interface = &RootNode{} // Verify that interface is implemented.
|
var _ ctlsocksrv.Interface = &RootNode{} // Verify that interface is implemented.
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -17,13 +17,13 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/inomap"
|
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
|
||||||
"github.com/rfjakob/gocryptfs/internal/openfiletable"
|
"github.com/rfjakob/gocryptfs/v2/internal/openfiletable"
|
||||||
"github.com/rfjakob/gocryptfs/internal/serialize_reads"
|
"github.com/rfjakob/gocryptfs/v2/internal/serialize_reads"
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"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/v2/fs)
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FALLOC_DEFAULT is a "normal" fallocate operation
|
// FALLOC_DEFAULT is a "normal" fallocate operation
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Will a write to plaintext offset "targetOff" create a file hole in the
|
// Will a write to plaintext offset "targetOff" create a file hole in the
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (f *File) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) (errno syscall.Errno) {
|
func (f *File) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) (errno syscall.Errno) {
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Node is a file or directory in the filesystem tree
|
// Node is a file or directory in the filesystem tree
|
||||||
|
@ -12,11 +12,11 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const dsStoreName = ".DS_Store"
|
const dsStoreName = ".DS_Store"
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// toFuseCtx tries to extract a fuse.Context from a generic context.Context.
|
// toFuseCtx tries to extract a fuse.Context from a generic context.Context.
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Open - FUSE call. Open already-existing file.
|
// Open - FUSE call. Open already-existing file.
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
)
|
)
|
||||||
|
|
||||||
// prepareAtSyscall returns a (dirfd, cName) pair that can be used
|
// prepareAtSyscall returns a (dirfd, cName) pair that can be used
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// -1 as uint32
|
// -1 as uint32
|
||||||
@ -24,7 +24,7 @@ var xattrNameIV = []byte("xattr_name_iv_xx")
|
|||||||
var xattrStorePrefix = "user.gocryptfs."
|
var xattrStorePrefix = "user.gocryptfs."
|
||||||
|
|
||||||
// We get one read of this xattr for each write -
|
// We get one read of this xattr for each write -
|
||||||
// see https://github.com/rfjakob/gocryptfs/issues/515 for details.
|
// see https://github.com/rfjakob/gocryptfs/v2/issues/515 for details.
|
||||||
var xattrCapability = "security.capability"
|
var xattrCapability = "security.capability"
|
||||||
|
|
||||||
// isAcl returns true if the attribute name is for storing ACLs
|
// isAcl returns true if the attribute name is for storing ACLs
|
||||||
@ -41,7 +41,7 @@ func (n *Node) Getxattr(ctx context.Context, attr string, dest []byte) (uint32,
|
|||||||
rn := n.rootNode()
|
rn := n.rootNode()
|
||||||
// If we are not mounted with -suid, reading the capability xattr does not
|
// If we are not mounted with -suid, reading the capability xattr does not
|
||||||
// make a lot of sense, so reject the request and gain a massive speedup.
|
// make a lot of sense, so reject the request and gain a massive speedup.
|
||||||
// See https://github.com/rfjakob/gocryptfs/issues/515 .
|
// See https://github.com/rfjakob/gocryptfs/v2/issues/515 .
|
||||||
if !rn.args.Suid && attr == xattrCapability {
|
if !rn.args.Suid && attr == xattrCapability {
|
||||||
// Returning EOPNOTSUPP is what we did till
|
// Returning EOPNOTSUPP is what we did till
|
||||||
// ca9e912a28b901387e1dbb85f6c531119f2d5ef2 "fusefrontend: drop xattr user namespace restriction"
|
// ca9e912a28b901387e1dbb85f6c531119f2d5ef2 "fusefrontend: drop xattr user namespace restriction"
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
)
|
)
|
||||||
|
|
||||||
// On Darwin we have to unset XATTR_NOSECURITY 0x0008
|
// On Darwin we have to unset XATTR_NOSECURITY 0x0008
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
)
|
)
|
||||||
|
|
||||||
func filterXattrSetFlags(flags int) int {
|
func filterXattrSetFlags(flags int) int {
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPrepareAtSyscall(t *testing.T) {
|
func TestPrepareAtSyscall(t *testing.T) {
|
||||||
|
@ -7,13 +7,13 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/inomap"
|
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/serialize_reads"
|
"github.com/rfjakob/gocryptfs/v2/internal/serialize_reads"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RootNode is the root of the filesystem tree of Nodes.
|
// RootNode is the root of the filesystem tree of Nodes.
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestFS(args Args) *RootNode {
|
func newTestFS(args Args) *RootNode {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/ctlsocksrv"
|
"github.com/rfjakob/gocryptfs/v2/internal/ctlsocksrv"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Verify that the interface is implemented.
|
// Verify that the interface is implemented.
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fusefrontend"
|
"github.com/rfjakob/gocryptfs/v2/internal/fusefrontend"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
|
|
||||||
"github.com/sabhiram/go-gitignore"
|
"github.com/sabhiram/go-gitignore"
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/fusefrontend"
|
"github.com/rfjakob/gocryptfs/v2/internal/fusefrontend"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestShouldPrefixExcludeValuesWithSlash(t *testing.T) {
|
func TestShouldPrefixExcludeValuesWithSlash(t *testing.T) {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type File struct {
|
type File struct {
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/pathiv"
|
"github.com/rfjakob/gocryptfs/v2/internal/pathiv"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var inodeTable sync.Map
|
var inodeTable sync.Map
|
||||||
|
@ -12,10 +12,10 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/pathiv"
|
"github.com/rfjakob/gocryptfs/v2/internal/pathiv"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Node is a file or directory in the filesystem tree
|
// Node is a file or directory in the filesystem tree
|
||||||
|
@ -10,11 +10,11 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Readdir - FUSE call.
|
// Readdir - FUSE call.
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/pathiv"
|
"github.com/rfjakob/gocryptfs/v2/internal/pathiv"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,18 +6,18 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fusefrontend"
|
"github.com/rfjakob/gocryptfs/v2/internal/fusefrontend"
|
||||||
"github.com/rfjakob/gocryptfs/internal/inomap"
|
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
|
|
||||||
"github.com/sabhiram/go-gitignore"
|
"github.com/sabhiram/go-gitignore"
|
||||||
)
|
)
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/pathiv"
|
"github.com/rfjakob/gocryptfs/v2/internal/pathiv"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// rDecryptName decrypts the ciphertext name "cName", given the dirIV of the
|
// rDecryptName decrypts the ciphertext name "cName", given the dirIV of the
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/inomap"
|
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -68,7 +68,7 @@ func WriteDirIVAt(dirfd int) error {
|
|||||||
iv := cryptocore.RandBytes(DirIVLen)
|
iv := cryptocore.RandBytes(DirIVLen)
|
||||||
// 0400 permissions: gocryptfs.diriv should never be modified after creation.
|
// 0400 permissions: gocryptfs.diriv should never be modified after creation.
|
||||||
// Don't use "ioutil.WriteFile", it causes trouble on NFS:
|
// Don't use "ioutil.WriteFile", it causes trouble on NFS:
|
||||||
// https://github.com/rfjakob/gocryptfs/commit/7d38f80a78644c8ec4900cc990bfb894387112ed
|
// https://github.com/rfjakob/gocryptfs/v2/commit/7d38f80a78644c8ec4900cc990bfb894387112ed
|
||||||
fd, err := syscallcompat.Openat(dirfd, DirIVFilename, os.O_WRONLY|os.O_CREATE|os.O_EXCL, dirivPerms)
|
fd, err := syscallcompat.Openat(dirfd, DirIVFilename, os.O_WRONLY|os.O_CREATE|os.O_EXCL, dirivPerms)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tlog.Warn.Printf("WriteDirIV: Openat: %v", err)
|
tlog.Warn.Printf("WriteDirIV: Openat: %v", err)
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/syscallcompat"
|
"github.com/rfjakob/gocryptfs/v2/internal/syscallcompat"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/rfjakob/eme"
|
"github.com/rfjakob/eme"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,14 +6,14 @@ const (
|
|||||||
// never chmod'ed or chown'ed.
|
// never chmod'ed or chown'ed.
|
||||||
//
|
//
|
||||||
// Group-readable so the FS can be mounted by several users in the same group
|
// Group-readable so the FS can be mounted by several users in the same group
|
||||||
// (see https://github.com/rfjakob/gocryptfs/issues/387 ).
|
// (see https://github.com/rfjakob/gocryptfs/v2/issues/387 ).
|
||||||
//
|
//
|
||||||
// Note that gocryptfs.conf is still created with 0400 permissions so the
|
// Note that gocryptfs.conf is still created with 0400 permissions so the
|
||||||
// owner must explicitly chmod it to permit access.
|
// owner must explicitly chmod it to permit access.
|
||||||
//
|
//
|
||||||
// World-readable so an encrypted directory can be copied by the non-root
|
// World-readable so an encrypted directory can be copied by the non-root
|
||||||
// owner when gocryptfs is running as root
|
// owner when gocryptfs is running as root
|
||||||
// ( https://github.com/rfjakob/gocryptfs/issues/539 ).
|
// ( https://github.com/rfjakob/gocryptfs/v2/issues/539 ).
|
||||||
dirivPerms = 0444
|
dirivPerms = 0444
|
||||||
|
|
||||||
// Permissions for gocryptfs.longname.[sha256].name files.
|
// Permissions for gocryptfs.longname.[sha256].name files.
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/inomap"
|
"github.com/rfjakob/gocryptfs/v2/internal/inomap"
|
||||||
)
|
)
|
||||||
|
|
||||||
// wlock - serializes write accesses to each file (identified by inode number)
|
// wlock - serializes write accesses to each file (identified by inode number)
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Purpose identifies for which purpose the IV will be used. This is mixed into the
|
// Purpose identifies for which purpose the IV will be used. This is mixed into the
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// readPassFileConcatenate reads the first line from each file name and
|
// readPassFileConcatenate reads the first line from each file name and
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// serializerState is used by the Wait and Done functions
|
// serializerState is used by the Wait and Done functions
|
||||||
|
@ -14,8 +14,8 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/chacha20poly1305"
|
"golang.org/x/crypto/chacha20poly1305"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/siv_aead"
|
"github.com/rfjakob/gocryptfs/v2/internal/siv_aead"
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 128-bit file ID + 64 bit block number = 192 bits = 24 bytes
|
// 128-bit file ID + 64 bit block number = 192 bits = 24 bytes
|
||||||
|
@ -9,7 +9,7 @@ BenchmarkStupidGCM-2 100000 22552 ns/op 181.62 MB/s
|
|||||||
BenchmarkGoGCM-2 20000 81871 ns/op 50.03 MB/s
|
BenchmarkGoGCM-2 20000 81871 ns/op 50.03 MB/s
|
||||||
BenchmarkAESSIV-2 10000 104623 ns/op 39.15 MB/s
|
BenchmarkAESSIV-2 10000 104623 ns/op 39.15 MB/s
|
||||||
PASS
|
PASS
|
||||||
ok github.com/rfjakob/gocryptfs/internal/speed 6.022s
|
ok github.com/rfjakob/gocryptfs/v2/internal/speed 6.022s
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
// 2) Is ARM64 && has AES instructions && Go is v1.11 or higher
|
// 2) Is ARM64 && has AES instructions && Go is v1.11 or higher
|
||||||
// (commit https://github.com/golang/go/commit/4f1f503373cda7160392be94e3849b0c9b9ebbda)
|
// (commit https://github.com/golang/go/commit/4f1f503373cda7160392be94e3849b0c9b9ebbda)
|
||||||
//
|
//
|
||||||
// See https://github.com/rfjakob/gocryptfs/wiki/CPU-Benchmarks
|
// See https://github.com/rfjakob/gocryptfs/v2/wiki/CPU-Benchmarks
|
||||||
// for benchmarks.
|
// for benchmarks.
|
||||||
func PreferOpenSSL() bool {
|
func PreferOpenSSL() bool {
|
||||||
if BuiltWithoutOpenssl {
|
if BuiltWithoutOpenssl {
|
||||||
@ -26,7 +26,7 @@ func PreferOpenSSL() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// On the Apple M1, Go stdlib is faster than OpenSSL, despite cpu.ARM64.HasAES
|
// On the Apple M1, Go stdlib is faster than OpenSSL, despite cpu.ARM64.HasAES
|
||||||
// reading false: https://github.com/rfjakob/gocryptfs/issues/556#issuecomment-848079309
|
// reading false: https://github.com/rfjakob/gocryptfs/v2/issues/556#issuecomment-848079309
|
||||||
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
|
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StupidGCM struct{}
|
type StupidGCM struct{}
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
// https://github.com/golang/go/blob/d2a80f3fb5b44450e0b304ac5a718f99c053d82a/src/os/file_posix.go#L243
|
// https://github.com/golang/go/blob/d2a80f3fb5b44450e0b304ac5a718f99c053d82a/src/os/file_posix.go#L243
|
||||||
//
|
//
|
||||||
// This is needed because CIFS throws lots of EINTR errors:
|
// This is needed because CIFS throws lots of EINTR errors:
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/483
|
// https://github.com/rfjakob/gocryptfs/v2/issues/483
|
||||||
//
|
//
|
||||||
// Don't use retryEINTR() with syscall.Close()!
|
// Don't use retryEINTR() with syscall.Close()!
|
||||||
// See https://code.google.com/p/chromium/issues/detail?id=269623 .
|
// See https://code.google.com/p/chromium/issues/detail?id=269623 .
|
||||||
|
@ -16,14 +16,14 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const sizeofDirent = int(unsafe.Sizeof(unix.Dirent{}))
|
const sizeofDirent = int(unsafe.Sizeof(unix.Dirent{}))
|
||||||
|
|
||||||
// maxReclen sanity check: Reclen should never be larger than this.
|
// maxReclen sanity check: Reclen should never be larger than this.
|
||||||
// Due to padding between entries, it is 280 even on 32-bit architectures.
|
// Due to padding between entries, it is 280 even on 32-bit architectures.
|
||||||
// See https://github.com/rfjakob/gocryptfs/issues/197 for details.
|
// See https://github.com/rfjakob/gocryptfs/v2/issues/197 for details.
|
||||||
const maxReclen = 280
|
const maxReclen = 280
|
||||||
|
|
||||||
// getdents wraps unix.Getdents and converts the result to []fuse.DirEntry.
|
// getdents wraps unix.Getdents and converts the result to []fuse.DirEntry.
|
||||||
@ -43,7 +43,7 @@ func getdents(fd int) (entries []fuse.DirEntry, entriesSpecial []fuse.DirEntry,
|
|||||||
continue
|
continue
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
if smartBuf.Len() > 0 {
|
if smartBuf.Len() > 0 {
|
||||||
tlog.Warn.Printf("warning: unix.Getdents returned errno %d in the middle of data ( https://github.com/rfjakob/gocryptfs/issues/483 )", err.(syscall.Errno))
|
tlog.Warn.Printf("warning: unix.Getdents returned errno %d in the middle of data ( https://github.com/rfjakob/gocryptfs/v2/issues/483 )", err.(syscall.Errno))
|
||||||
return nil, nil, syscall.EIO
|
return nil, nil, syscall.EIO
|
||||||
}
|
}
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
@ -145,7 +145,7 @@ func dtUnknownWarn(dirfd int) {
|
|||||||
if err == nil && buf.Type == XFS_SUPER_MAGIC {
|
if err == nil && buf.Type == XFS_SUPER_MAGIC {
|
||||||
// Old XFS filesystems always return DT_UNKNOWN. Downgrade the message
|
// Old XFS filesystems always return DT_UNKNOWN. Downgrade the message
|
||||||
// to "info" level if we are on XFS.
|
// to "info" level if we are on XFS.
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/267
|
// https://github.com/rfjakob/gocryptfs/v2/issues/267
|
||||||
tlog.Info.Printf("Getdents: convertDType: received DT_UNKNOWN, fstype=xfs, falling back to stat")
|
tlog.Info.Printf("Getdents: convertDType: received DT_UNKNOWN, fstype=xfs, falling back to stat")
|
||||||
} else {
|
} else {
|
||||||
tlog.Warn.Printf("Getdents: convertDType: received DT_UNKNOWN, fstype=%#x, falling back to stat",
|
tlog.Warn.Printf("Getdents: convertDType: received DT_UNKNOWN, fstype=%#x, falling back to stat",
|
||||||
|
@ -27,7 +27,7 @@ func TestGetdents(t *testing.T) {
|
|||||||
|
|
||||||
// skipOnGccGo skips the emulateGetdents test when we are
|
// skipOnGccGo skips the emulateGetdents test when we are
|
||||||
// running linux and were compiled with gccgo. The test is known to fail
|
// running linux and were compiled with gccgo. The test is known to fail
|
||||||
// (https://github.com/rfjakob/gocryptfs/issues/201), but getdents emulation
|
// (https://github.com/rfjakob/gocryptfs/v2/issues/201), but getdents emulation
|
||||||
// is not used on linux, so let's skip the test and ignore the failure.
|
// is not used on linux, so let's skip the test and ignore the failure.
|
||||||
func skipOnGccGo(t *testing.T) {
|
func skipOnGccGo(t *testing.T) {
|
||||||
if !emulate || runtime.GOOS != "linux" {
|
if !emulate || runtime.GOOS != "linux" {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OpenDirNofollow opens the dir at "relPath" in a way that is secure against
|
// OpenDirNofollow opens the dir at "relPath" in a way that is secure against
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
package syscallcompat
|
package syscallcompat
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// QuirkBrokenFalloc means the falloc is broken.
|
// QuirkBrokenFalloc means the falloc is broken.
|
||||||
// Preallocation on Btrfs is broken ( https://github.com/rfjakob/gocryptfs/issues/395 )
|
// Preallocation on Btrfs is broken ( https://github.com/rfjakob/gocryptfs/v2/issues/395 )
|
||||||
// and slow ( https://github.com/rfjakob/gocryptfs/issues/63 ).
|
// and slow ( https://github.com/rfjakob/gocryptfs/v2/issues/63 ).
|
||||||
QuirkBrokenFalloc = uint64(1 << iota)
|
QuirkBrokenFalloc = uint64(1 << iota)
|
||||||
// QuirkDuplicateIno1 means that we have duplicate inode numbers.
|
// QuirkDuplicateIno1 means that we have duplicate inode numbers.
|
||||||
// On MacOS ExFAT, all empty files share inode number 1:
|
// On MacOS ExFAT, all empty files share inode number 1:
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/585
|
// https://github.com/rfjakob/gocryptfs/v2/issues/585
|
||||||
QuirkDuplicateIno1
|
QuirkDuplicateIno1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,12 +3,12 @@ package syscallcompat
|
|||||||
import (
|
import (
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DetectQuirks(cipherdir string) (q uint64) {
|
func DetectQuirks(cipherdir string) (q uint64) {
|
||||||
const (
|
const (
|
||||||
// From https://github.com/rfjakob/gocryptfs/issues/585#issuecomment-887370065
|
// From https://github.com/rfjakob/gocryptfs/v2/issues/585#issuecomment-887370065
|
||||||
FstypenameExfat = "exfat"
|
FstypenameExfat = "exfat"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -31,9 +31,9 @@ func DetectQuirks(cipherdir string) (q uint64) {
|
|||||||
tlog.Debug.Printf("DetectQuirks: Fstypename=%q\n", fstypename)
|
tlog.Debug.Printf("DetectQuirks: Fstypename=%q\n", fstypename)
|
||||||
|
|
||||||
// On MacOS ExFAT, all empty files share inode number 1:
|
// On MacOS ExFAT, all empty files share inode number 1:
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/585
|
// https://github.com/rfjakob/gocryptfs/v2/issues/585
|
||||||
if fstypename == FstypenameExfat {
|
if fstypename == FstypenameExfat {
|
||||||
logQuirk("ExFAT detected, disabling hard links. See https://github.com/rfjakob/gocryptfs/issues/585 for why.")
|
logQuirk("ExFAT detected, disabling hard links. See https://github.com/rfjakob/gocryptfs/v2/issues/585 for why.")
|
||||||
q |= QuirkDuplicateIno1
|
q |= QuirkDuplicateIno1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package syscallcompat
|
|||||||
import (
|
import (
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DetectQuirks decides if there are known quirks on the backing filesystem
|
// DetectQuirks decides if there are known quirks on the backing filesystem
|
||||||
@ -18,12 +18,12 @@ func DetectQuirks(cipherdir string) (q uint64) {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preallocation on Btrfs is broken ( https://github.com/rfjakob/gocryptfs/issues/395 )
|
// Preallocation on Btrfs is broken ( https://github.com/rfjakob/gocryptfs/v2/issues/395 )
|
||||||
// and slow ( https://github.com/rfjakob/gocryptfs/issues/63 ).
|
// and slow ( https://github.com/rfjakob/gocryptfs/v2/issues/63 ).
|
||||||
//
|
//
|
||||||
// Cast to uint32 avoids compile error on arm: "constant 2435016766 overflows int32"
|
// Cast to uint32 avoids compile error on arm: "constant 2435016766 overflows int32"
|
||||||
if uint32(st.Type) == unix.BTRFS_SUPER_MAGIC {
|
if uint32(st.Type) == unix.BTRFS_SUPER_MAGIC {
|
||||||
logQuirk("Btrfs detected, forcing -noprealloc. See https://github.com/rfjakob/gocryptfs/issues/395 for why.")
|
logQuirk("Btrfs detected, forcing -noprealloc. See https://github.com/rfjakob/gocryptfs/v2/issues/395 for why.")
|
||||||
q |= QuirkBrokenFalloc
|
q |= QuirkBrokenFalloc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PATH_MAX is the maximum allowed path length on Linux.
|
// PATH_MAX is the maximum allowed path length on Linux.
|
||||||
|
@ -59,7 +59,7 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
|
|||||||
|
|
||||||
// Sorry, fallocate is not available on OSX at all and
|
// Sorry, fallocate is not available on OSX at all and
|
||||||
// fcntl F_PREALLOCATE is not accessible from Go.
|
// fcntl F_PREALLOCATE is not accessible from Go.
|
||||||
// See https://github.com/rfjakob/gocryptfs/issues/18 if you want to help.
|
// See https://github.com/rfjakob/gocryptfs/v2/issues/18 if you want to help.
|
||||||
func EnospcPrealloc(fd int, off int64, len int64) error {
|
func EnospcPrealloc(fd int, off int64, len int64) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -48,7 +48,7 @@ func EnospcPrealloc(fd int, off int64, len int64) (err error) {
|
|||||||
}
|
}
|
||||||
if err == syscall.EOPNOTSUPP {
|
if err == syscall.EOPNOTSUPP {
|
||||||
// ZFS and ext3 do not support fallocate. Warn but continue anyway.
|
// ZFS and ext3 do not support fallocate. Warn but continue anyway.
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/22
|
// https://github.com/rfjakob/gocryptfs/v2/issues/22
|
||||||
preallocWarn.Do(func() {
|
preallocWarn.Do(func() {
|
||||||
tlog.Warn.Printf("Warning: The underlying filesystem " +
|
tlog.Warn.Printf("Warning: The underlying filesystem " +
|
||||||
"does not support fallocate(2). gocryptfs will continue working " +
|
"does not support fallocate(2). gocryptfs will continue working " +
|
||||||
|
18
main.go
18
main.go
@ -1,5 +1,5 @@
|
|||||||
// gocryptfs is an encrypted overlay filesystem written in Go.
|
// gocryptfs is an encrypted overlay filesystem written in Go.
|
||||||
// See README.md ( https://github.com/rfjakob/gocryptfs/blob/master/README.md )
|
// See README.md ( https://github.com/rfjakob/gocryptfs/v2/blob/master/README.md )
|
||||||
// and the official website ( https://nuetzlich.net/gocryptfs/ ) for details.
|
// and the official website ( https://nuetzlich.net/gocryptfs/ ) for details.
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@ -14,14 +14,14 @@ import (
|
|||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fido2"
|
"github.com/rfjakob/gocryptfs/v2/internal/fido2"
|
||||||
"github.com/rfjakob/gocryptfs/internal/readpassword"
|
"github.com/rfjakob/gocryptfs/v2/internal/readpassword"
|
||||||
"github.com/rfjakob/gocryptfs/internal/speed"
|
"github.com/rfjakob/gocryptfs/v2/internal/speed"
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GitVersion is the gocryptfs version according to git, set by build.bash
|
// GitVersion is the gocryptfs version according to git, set by build.bash
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/readpassword"
|
"github.com/rfjakob/gocryptfs/v2/internal/readpassword"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// unhexMasterKey - Convert a hex-encoded master key to binary.
|
// unhexMasterKey - Convert a hex-encoded master key to binary.
|
||||||
|
22
mount.go
22
mount.go
@ -22,16 +22,16 @@ import (
|
|||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/contentenc"
|
"github.com/rfjakob/gocryptfs/v2/internal/contentenc"
|
||||||
"github.com/rfjakob/gocryptfs/internal/cryptocore"
|
"github.com/rfjakob/gocryptfs/v2/internal/cryptocore"
|
||||||
"github.com/rfjakob/gocryptfs/internal/ctlsocksrv"
|
"github.com/rfjakob/gocryptfs/v2/internal/ctlsocksrv"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fusefrontend"
|
"github.com/rfjakob/gocryptfs/v2/internal/fusefrontend"
|
||||||
"github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse"
|
"github.com/rfjakob/gocryptfs/v2/internal/fusefrontend_reverse"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
"github.com/rfjakob/gocryptfs/internal/openfiletable"
|
"github.com/rfjakob/gocryptfs/v2/internal/openfiletable"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AfterUnmount is called after the filesystem has been unmounted.
|
// AfterUnmount is called after the filesystem has been unmounted.
|
||||||
@ -73,7 +73,7 @@ func doMount(args *argContainer) {
|
|||||||
// and `drop_privileges` in `man mount.fuse3` for background.
|
// and `drop_privileges` in `man mount.fuse3` for background.
|
||||||
} else {
|
} else {
|
||||||
err = isEmptyDir(args.mountpoint)
|
err = isEmptyDir(args.mountpoint)
|
||||||
// OSXFuse will create the mountpoint for us ( https://github.com/rfjakob/gocryptfs/issues/194 )
|
// OSXFuse will create the mountpoint for us ( https://github.com/rfjakob/gocryptfs/v2/issues/194 )
|
||||||
if runtime.GOOS == "darwin" && os.IsNotExist(err) {
|
if runtime.GOOS == "darwin" && os.IsNotExist(err) {
|
||||||
tlog.Info.Printf("Mountpoint %q does not exist, but should be created by OSXFuse",
|
tlog.Info.Printf("Mountpoint %q does not exist, but should be created by OSXFuse",
|
||||||
args.mountpoint)
|
args.mountpoint)
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"runtime/trace"
|
"runtime/trace"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setupCpuprofile is called to handle a non-empty "-cpuprofile" cli argument
|
// setupCpuprofile is called to handle a non-empty "-cpuprofile" cli argument
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/tlog"
|
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Send signal USR1 to "pid" (usually our parent process). This notifies it
|
// Send signal USR1 to "pid" (usually our parent process). This notifies it
|
||||||
|
@ -14,11 +14,11 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/internal/nametransform"
|
"github.com/rfjakob/gocryptfs/v2/internal/nametransform"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testPw = []byte("test")
|
var testPw = []byte("test")
|
||||||
@ -61,9 +61,9 @@ func TestInitFilePerms(t *testing.T) {
|
|||||||
syscall.Stat(dir+"/gocryptfs.diriv", &st)
|
syscall.Stat(dir+"/gocryptfs.diriv", &st)
|
||||||
perms = st.Mode & 0777
|
perms = st.Mode & 0777
|
||||||
// From v1.7.1, these are created with 0440 permissions, see
|
// From v1.7.1, these are created with 0440 permissions, see
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/387 .
|
// https://github.com/rfjakob/gocryptfs/v2/issues/387 .
|
||||||
// From v2.0, created with 0444 perms, see
|
// From v2.0, created with 0444 perms, see
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/539 .
|
// https://github.com/rfjakob/gocryptfs/v2/issues/539 .
|
||||||
if perms != 0444 {
|
if perms != 0444 {
|
||||||
t.Errorf("Wrong permissions for gocryptfs.diriv: %#o", perms)
|
t.Errorf("Wrong permissions for gocryptfs.diriv: %#o", perms)
|
||||||
}
|
}
|
||||||
@ -442,7 +442,7 @@ func TestPasswdPasswordIncorrect(t *testing.T) {
|
|||||||
// Check that we correctly background on mount and close stderr and stdout.
|
// Check that we correctly background on mount and close stderr and stdout.
|
||||||
// Something like
|
// Something like
|
||||||
// gocryptfs a b | cat
|
// gocryptfs a b | cat
|
||||||
// must not hang ( https://github.com/rfjakob/gocryptfs/issues/130 ).
|
// must not hang ( https://github.com/rfjakob/gocryptfs/v2/issues/130 ).
|
||||||
func TestMountBackground(t *testing.T) {
|
func TestMountBackground(t *testing.T) {
|
||||||
dir := test_helpers.InitFS(t)
|
dir := test_helpers.InitFS(t)
|
||||||
mnt := dir + ".mnt"
|
mnt := dir + ".mnt"
|
||||||
@ -558,7 +558,7 @@ func TestExcludeForward(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check that the config file can be read from a named pipe.
|
// Check that the config file can be read from a named pipe.
|
||||||
// Make sure bug https://github.com/rfjakob/gocryptfs/issues/258 does not come
|
// Make sure bug https://github.com/rfjakob/gocryptfs/v2/issues/258 does not come
|
||||||
// back.
|
// back.
|
||||||
func TestConfigPipe(t *testing.T) {
|
func TestConfigPipe(t *testing.T) {
|
||||||
dir := test_helpers.InitFS(t)
|
dir := test_helpers.InitFS(t)
|
||||||
@ -581,7 +581,7 @@ func TestConfigPipe(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ciphertext dir and mountpoint contains a comma
|
// Ciphertext dir and mountpoint contains a comma
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/262
|
// https://github.com/rfjakob/gocryptfs/v2/issues/262
|
||||||
func TestComma(t *testing.T) {
|
func TestComma(t *testing.T) {
|
||||||
dir0 := test_helpers.InitFS(t)
|
dir0 := test_helpers.InitFS(t)
|
||||||
dir := dir0 + ",foo,bar"
|
dir := dir0 + ",foo,bar"
|
||||||
@ -626,7 +626,7 @@ func TestIdle(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mount with idle timeout of 100ms read something every 10ms. The fs should
|
// Mount with idle timeout of 100ms read something every 10ms. The fs should
|
||||||
// NOT get unmounted. Regression test for https://github.com/rfjakob/gocryptfs/issues/421
|
// NOT get unmounted. Regression test for https://github.com/rfjakob/gocryptfs/v2/issues/421
|
||||||
func TestNotIdle(t *testing.T) {
|
func TestNotIdle(t *testing.T) {
|
||||||
dir := test_helpers.InitFS(t)
|
dir := test_helpers.InitFS(t)
|
||||||
mnt := dir + ".mnt"
|
mnt := dir + ".mnt"
|
||||||
@ -664,7 +664,7 @@ func TestNotIdle(t *testing.T) {
|
|||||||
|
|
||||||
// TestSymlinkedCipherdir checks that if CIPHERDIR itself is a symlink, it is
|
// TestSymlinkedCipherdir checks that if CIPHERDIR itself is a symlink, it is
|
||||||
// followed.
|
// followed.
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/450
|
// https://github.com/rfjakob/gocryptfs/v2/issues/450
|
||||||
func TestSymlinkedCipherdir(t *testing.T) {
|
func TestSymlinkedCipherdir(t *testing.T) {
|
||||||
dir := test_helpers.InitFS(t)
|
dir := test_helpers.InitFS(t)
|
||||||
dirSymlink := dir + ".symlink"
|
dirSymlink := dir + ".symlink"
|
||||||
@ -910,7 +910,7 @@ func TestPassfileX2(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestInitNotEmpty checks that `gocryptfs -init` returns the right error code
|
// TestInitNotEmpty checks that `gocryptfs -init` returns the right error code
|
||||||
// if CIPHERDIR is not empty. See https://github.com/rfjakob/gocryptfs/pull/503
|
// if CIPHERDIR is not empty. See https://github.com/rfjakob/gocryptfs/v2/pull/503
|
||||||
func TestInitNotEmpty(t *testing.T) {
|
func TestInitNotEmpty(t *testing.T) {
|
||||||
dir := test_helpers.TmpDir + "/" + t.Name()
|
dir := test_helpers.TmpDir + "/" + t.Name()
|
||||||
if err := os.Mkdir(dir, 0700); err != nil {
|
if err := os.Mkdir(dir, 0700); err != nil {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestZerokey verifies that `gocryptfs -zerokey` uses the same options as
|
// TestZerokey verifies that `gocryptfs -zerokey` uses the same options as
|
||||||
|
@ -14,10 +14,10 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/xattr"
|
"github.com/pkg/xattr"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/543
|
// https://github.com/rfjakob/gocryptfs/v2/issues/543
|
||||||
func TestCpA(t *testing.T) {
|
func TestCpA(t *testing.T) {
|
||||||
fn1 := filepath.Join(test_helpers.TmpDir, t.Name())
|
fn1 := filepath.Join(test_helpers.TmpDir, t.Name())
|
||||||
fn2 := filepath.Join(test_helpers.DefaultPlainDir, t.Name())
|
fn2 := filepath.Join(test_helpers.DefaultPlainDir, t.Name())
|
||||||
@ -77,7 +77,7 @@ func getfacl(fn string) (string, error) {
|
|||||||
return string(out), err
|
return string(out), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/rfjakob/gocryptfs/issues/543
|
// https://github.com/rfjakob/gocryptfs/v2/issues/543
|
||||||
func TestAcl543(t *testing.T) {
|
func TestAcl543(t *testing.T) {
|
||||||
fn1 := test_helpers.TmpDir + "/TestAcl543"
|
fn1 := test_helpers.TmpDir + "/TestAcl543"
|
||||||
fn2 := test_helpers.DefaultPlainDir + "/TestAcl543"
|
fn2 := test_helpers.DefaultPlainDir + "/TestAcl543"
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/ctlsock"
|
"github.com/rfjakob/gocryptfs/v2/ctlsock"
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCtlSock(t *testing.T) {
|
func TestCtlSock(t *testing.T) {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDirIVRace(t *testing.T) {
|
func TestDirIVRace(t *testing.T) {
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
@ -239,7 +239,7 @@ func TestMvWarningSymlink(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Log(string(out))
|
t.Log(string(out))
|
||||||
if runtime.GOOS == "darwin" {
|
if runtime.GOOS == "darwin" {
|
||||||
t.Skip("mv on darwin chokes on broken symlinks, see https://github.com/rfjakob/gocryptfs/issues/349")
|
t.Skip("mv on darwin chokes on broken symlinks, see https://github.com/rfjakob/gocryptfs/v2/issues/349")
|
||||||
}
|
}
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Benchmarks
|
// Benchmarks
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/configfile"
|
"github.com/rfjakob/gocryptfs/v2/internal/configfile"
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var cDir string
|
var cDir string
|
||||||
|
@ -14,8 +14,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
|
"github.com/rfjakob/gocryptfs/v2/internal/stupidgcm"
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var opensslOpt string
|
var opensslOpt string
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
const statusTxtContent = "It works!\n"
|
const statusTxtContent = "It works!\n"
|
||||||
|
@ -12,8 +12,8 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/xattr"
|
"github.com/pkg/xattr"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/internal/exitcodes"
|
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func dec64(in string) (out []byte) {
|
func dec64(in string) (out []byte) {
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rfjakob/gocryptfs/tests/test_helpers"
|
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBrokenContent(t *testing.T) {
|
func TestBrokenContent(t *testing.T) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user