Explain both frontends in readme
Also, re-enable openssl and disable debug messages so testing gocryptfs is less painful
This commit is contained in:
parent
bfdbbbf8b4
commit
80935a0e1b
16
README.md
16
README.md
@ -2,12 +2,20 @@ GoCryptFS
|
||||
=========
|
||||
A minimal encrypted overlay filesystem written in Go.
|
||||
|
||||
Built on top of the
|
||||
native Go FUSE library [bazil.org/fuse](https://github.com/bazil/fuse)
|
||||
and the [ClueFS](https://github.com/airnandez/cluefs) loopback file system.
|
||||
|
||||
Inspired by [EncFS](https://github.com/vgough/encfs).
|
||||
|
||||
GoCryptFS at the moment has two FUSE frontends:
|
||||
|
||||
* The [go-fuse](https://github.com/hanwen/go-fuse) FUSE library using its
|
||||
LoopbackFileSystem API
|
||||
* The FUSE library [bazil.org/fuse](https://github.com/bazil/fuse) plus the
|
||||
[ClueFS](https://github.com/airnandez/cluefs) loopback filesystem
|
||||
|
||||
A frontend is selected on compile-time by setting `USE_CLUEFS` to true or false
|
||||
(default false).
|
||||
Once I decide that one works better for GoCryptFS, the other one
|
||||
will go away.
|
||||
|
||||
Design
|
||||
------
|
||||
* Authenticated encryption of file contents using AES-GCM-128
|
||||
|
@ -15,5 +15,5 @@ func (l logChannel) Printf(format string, args ...interface{}) {
|
||||
}
|
||||
|
||||
|
||||
var Debug = logChannel{true}
|
||||
var Debug = logChannel{false}
|
||||
var Warn = logChannel{true}
|
||||
|
5
main.go
5
main.go
@ -19,12 +19,13 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
USE_CLUEFS = false
|
||||
USE_OPENSSL = false
|
||||
USE_CLUEFS = false // Use cluefs or pathfs FUSE frontend
|
||||
USE_OPENSSL = true // 3x speed increase
|
||||
PATHFS_DEBUG = false
|
||||
|
||||
PROGRAM_NAME = "gocryptfs"
|
||||
|
||||
// Exit codes
|
||||
ERREXIT_USAGE = 1
|
||||
ERREXIT_NEWFS = 2
|
||||
ERREXIT_MOUNT = 3
|
||||
|
@ -90,7 +90,7 @@ func (f *file) doRead(off uint64, length uint64) ([]byte, fuse.Status) {
|
||||
|
||||
// Read - FUSE call
|
||||
func (f *file) Read(buf []byte, off int64) (resultData fuse.ReadResult, code fuse.Status) {
|
||||
cryptfs.Debug.Printf("\n\nGot read request: len=%d off=%d\n", len(buf), off)
|
||||
cryptfs.Debug.Printf("Read: offset=%d length=%d\n", len(buf), off)
|
||||
|
||||
if f.writeOnly {
|
||||
cryptfs.Warn.Printf("Tried to read from write-only file\n")
|
||||
|
Loading…
Reference in New Issue
Block a user