aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-04 14:30:57 +0200
committerJakob Unterwurzacher2015-10-04 14:35:50 +0200
commit5bd08abf4095fb553355c9b007c8ae4a4314b970 (patch)
tree3956a0da0d232ef0eb82c3471607759979d6719c /main.go
parentc859f0b2dc8825763c3b63163a014435a8cdb3cf (diff)
Remove ClueFS frontend
Development has focused on PathFS for some time now and things are working well.
Diffstat (limited to 'main.go')
-rw-r--r--main.go48
1 files changed, 2 insertions, 46 deletions
diff --git a/main.go b/main.go
index 5f85084..35f83b6 100644
--- a/main.go
+++ b/main.go
@@ -11,15 +11,11 @@ import (
"encoding/hex"
"runtime"
- "github.com/rfjakob/gocryptfs/cluefs_frontend"
"github.com/rfjakob/gocryptfs/pathfs_frontend"
"github.com/rfjakob/gocryptfs/cryptfs"
"golang.org/x/crypto/ssh/terminal"
- bazilfuse "bazil.org/fuse"
- bazilfusefs "bazil.org/fuse/fs"
-
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
@@ -136,11 +132,7 @@ func main() {
printMasterKey(key)
}
- if USE_CLUEFS {
- cluefsFrontend(key, cipherdir, mountpoint)
- } else {
- pathfsFrontend(key, cipherdir, mountpoint, fusedebug)
- }
+ pathfsFrontend(key, cipherdir, mountpoint, fusedebug)
}
// printMasterKey - remind the user that he should store the master key in
@@ -197,43 +189,7 @@ func dirEmpty(dir string) bool {
return false
}
-func cluefsFrontend(key []byte, cipherdir string, mountpoint string) {
- cfs, err := cluefs_frontend.NewFS(key, cipherdir, USE_OPENSSL)
- if err != nil {
- fmt.Println(err)
- os.Exit(ERREXIT_NEWFS)
- }
-
- // Mount the file system
- mountOpts := []bazilfuse.MountOption{
- bazilfuse.FSName(PROGRAM_NAME),
- bazilfuse.Subtype(PROGRAM_NAME),
- bazilfuse.VolumeName(PROGRAM_NAME),
- bazilfuse.LocalVolume(),
- bazilfuse.MaxReadahead(1024 * 1024),
- }
- conn, err := bazilfuse.Mount(mountpoint, mountOpts...)
- if err != nil {
- fmt.Println(err)
- os.Exit(ERREXIT_MOUNT)
- }
- defer conn.Close()
-
- // Start serving requests
- if err = bazilfusefs.Serve(conn, cfs); err != nil {
- fmt.Println(err)
- os.Exit(ERREXIT_SERVE)
- }
-
- // Check for errors when mounting the file system
- <-conn.Ready
- if err = conn.MountError; err != nil {
- fmt.Println(err)
- os.Exit(ERREXIT_MOUNT2)
- }
-}
-
-func pathfsFrontend(key []byte, cipherdir string, mountpoint string, debug bool){
+func pathfsFrontend(key []byte, cipherdir string, mountpoint string, debug bool) {
finalFs := pathfs_frontend.NewFS(key, cipherdir, USE_OPENSSL)