aboutsummaryrefslogtreecommitdiff
path: root/main.go
AgeCommit message (Collapse)Author
2017-01-26main: make sure the ctlsock file is deleted on incorrect passwordJakob Unterwurzacher
Otherwise the next try to mount ends in "ctlsock: listen unix ctl.sock: bind: address already in use"
2016-11-23main: give deferred functions a chance to run (fixes -cpuprofile)Jakob Unterwurzacher
2016-11-01main: fix comments that reference "-f"Jakob Unterwurzacher
2016-11-01main: rename "-f" to "-fg"Jakob Unterwurzacher
"-f" looks too much like "--force". The old variant is still accepted for compatability.
2016-10-16main: allow password change with -masterkeyJakob Unterwurzacher
Requested at https://github.com/rfjakob/gocryptfs/issues/28
2016-10-09main: more useful error message on unknown flagJakob Unterwurzacher
2016-10-09main: also accept options at the end via "-o"Jakob Unterwurzacher
For compatability with mount(1), options are also accepted as "-o COMMA-SEPARATED-OPTIONS" at the end of the command line. For example, "-o q,zerokey" is equivalent to "-q -zerokey".
2016-10-09main: friendlier error message on wrong number of argumentsJakob Unterwurzacher
Before: Usage: gocryptfs [OPTIONS] CIPHERDIR MOUNTPOINT After: Wrong number of arguments (have 9, want 2). You passed: "-nosyslog" "." "asd" "-q" "ß" "asdf" "fg" "gh" "sdf" "asd fs\\dfg" Usage: gocryptfs [OPTIONS] CIPHERDIR MOUNTPOINT
2016-10-08reverse: make gocryptfs.conf mapping plaintextnames-awareJakob Unterwurzacher
Only in plaintextnames-mode AND with the config file at the default location it will be mapped into the mountpoint. Also adds a test for that.
2016-10-08main: split doMount into its own fileJakob Unterwurzacher
Ongoing effort to reduce the size of main().
2016-10-08main: check if the config file can opened before prompting for passwordJakob Unterwurzacher
This was frustrating: $ gocryptfs a b Password: Decrypting master key open a/gocryptfs.conf: permission denied
2016-10-07MANPAGE: note that "-f" implies "-nosyslog"Jakob Unterwurzacher
Also explain why AES-SIV exists.
2016-10-07main: daemonize more thoroughlyJakob Unterwurzacher
As described at http://software.clapper.org/daemonize/ , a daemon should chdir to / and close its FDs.
2016-10-07main: clarify nosyslog code pathJakob Unterwurzacher
Split the block up and add a comment why notifypid is important.
2016-10-06main: add "-nonempty" optionJakob Unterwurzacher
2016-10-04lint fixesValient Gough
2016-10-04without_openssl: support compiling completely without opensslJakob Unterwurzacher
Build helper script: build-without-openssl.bash
2016-09-26reverse: switch from GCM-SIV to AES-SIVv1.1-beta1Jakob Unterwurzacher
GCM-SIV is not yet finalized, and the reference implemenation is painfully slow at about 2 MB/s. Switch to AES-SIV.
2016-09-25Implement changes proposed by gosimple.Jakob Unterwurzacher
Also delete the unused "dirIVNameStruct", found by deadcode.
2016-09-25reverse: add gcmsiv flag and associated testsJakob Unterwurzacher
2016-09-25reverse: use dynamic inode numbersJakob Unterwurzacher
...with stable mappings for hard-linked files.
2016-09-25contentenc: add GCM-SIV supportJakob Unterwurzacher
Also add ReverseDummyNonce nonce generation.
2016-09-25cryptocore: add support for GCM-SIVJakob Unterwurzacher
2016-09-25main: move initDir into its own fileJakob Unterwurzacher
2016-09-25main: add explicit exit after forkChildJakob Unterwurzacher
Trying to make it more obvious what is happening.
2016-09-25main: factor out cli arg parsingJakob Unterwurzacher
The main function has gotten way too big.
2016-09-25reverse: let the kernel enforce read-only modeJakob Unterwurzacher
... and print a warning that reverse mode is experimental
2016-09-25main: initial support for reverse modeJakob Unterwurzacher
2016-07-03main: bake build date into version stringJakob Unterwurzacher
$ gocryptfs -version gocryptfs v0.12-36-ge021b9d-dirty; go-fuse a4c968c; 2016-07-03 go1.6.2
2016-07-03main: yellow text for masterkey and zerokey warningsJakob Unterwurzacher
Also, mention that the shell may save the command line into the history and reduce "ps -auxwww" to "ps ax" (that's all you need).
2016-06-26tlog: switch default logger to syslogJakob Unterwurzacher
...unless "-nosyslog" is passed. All gocryptfs messages already go to syslog, but the messages that the go-fuse lib emits were still printed to stdout. Fixes issue #13 ( https://github.com/rfjakob/gocryptfs/issues/13 )
2016-06-26main: add "-o" option to enable "suid" and "dev"Jakob Unterwurzacher
Device files and suid binaries are often not needed when running gocryptfs as root. As they are potentially dangerous, let the user enable them explicitely via the new "-o" option instead of always enabling them when running as root.
2016-06-26main, fusefrontend: enable suid functionalityJakob Unterwurzacher
FUSE filesystems are mounted with "nosuid" by default. If we run as root, we can use device files by passing the opposite mount option, "suid". Also we have to use syscall.Chmod instead of os.Chmod because the portability translation layer "syscallMode" messes up the sgid and suid bits. Fixes 70% of the failures in xfstests generic/193. The remaining are related to truncate, but we err on the safe side: $ diff -u tests/generic/193.out /home/jakob/src/fuse-xfstests/results//generic/193.out.bad [...] check that suid/sgid bits are cleared after successful truncate... with no exec perm before: -rwSr-Sr-- -after: -rw-r-Sr-- +after: -rw-r--r--
2016-06-26main: enable device files when running as rootJakob Unterwurzacher
FUSE filesystems are mounted with "nodev" by default. If we run as root, we can use device files by passing the opposite mount option, "dev". Fixes xfstests generic/184.
2016-06-26fusefronted: preserve owner if running as rootJakob Unterwurzacher
If allow_other is set and we run as root, try to give newly created files to the right user.
2016-06-23Drop deprecated "-gcmiv128" optionJakob Unterwurzacher
The GCMIV128 feature flag is already mandatory, dropping the command line option is the final step. Completes https://github.com/rfjakob/gocryptfs/issues/29 .
2016-06-23Drop deprecated "-emenames" optionJakob Unterwurzacher
The EMENames feature flag is already mandatory, dropping the command line option is the final step.
2016-06-23Drop deprecated "-diriv" optionJakob Unterwurzacher
The DirIV feature flag is already mandatory, dropping the command line option is the final step.
2016-06-19Refuse mounting of v0.6 and older filesystemsJakob Unterwurzacher
2016-06-19main: drop "on-disk format" from -version output, add Go versionJakob Unterwurzacher
As v0.4 introduced ext4-style feature flags, the on-disk format version is unlinkely to change. Drop it from the version output to reduce clutter. Use "gocryptfs -version -debug" to see it. Add the Go version string because only Go 1.6 and newer have an optimized AES-GCM implementation. This will help users to understand the performance of their build.
2016-06-16Mount v0.6 and older filesystems as read-onlyJakob Unterwurzacher
This is part of the phase-out of very old filesystems. See https://github.com/rfjakob/gocryptfs/wiki/Compatibility for more info.
2016-06-16Add "-ro" (read-only) flagJakob Unterwurzacher
From the man page: **-ro** : Mount the filesystem read-only Also add a test.
2016-06-15Rename internal "toggledlog" package to "tlog"Jakob Unterwurzacher
tlog is used heavily everywhere and deserves a shorter name. Renamed using sed magic, without any manual rework: find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
2016-06-15toggledlog: assume command of color handlingJakob Unterwurzacher
We want to use colored error messages also outside of main, so let's handle it in the logging package. The fatal logger now automatically prints red.
2016-06-15readpassword: create internal package for password readingJakob Unterwurzacher
* Supports stdin * Add tests for extpass and stdin As per user request at https://github.com/rfjakob/gocryptfs/issues/30
2016-06-14Fix warnings reported by Go 1.6 "go tool vet -shadow=true"Jakob Unterwurzacher
Warnings were: main.go:234: declaration of err shadows declaration at main.go:163: internal/fusefrontend/file.go:401: declaration of err shadows declaration at internal/fusefrontend/file.go:379: internal/fusefrontend/file.go:419: declaration of err shadows declaration at internal/fusefrontend/file.go:379: internal/fusefrontend/fs_dir.go:140: declaration of err shadows declaration at internal/fusefrontend/fs_dir.go:97:
2016-06-05toggledlog: convert remaing naked fmt.Print*Jakob Unterwurzacher
Several fatal errors were just printed to stdout, which meant they were invisible when running the test suite. Fix this by introducing toggledlog.Fatal and convert as follows: Fatal errors -> toggledlog.Fatal Warnings -> toggledlog.Warn Password prompts -> fmt.Fprintf
2016-06-05main: print actual error from LoadConfFile()Jakob Unterwurzacher
It may not have been a "Wrong password" after all. Also, push down disabling the warning so LoadConfFile() can warn about things that matter.
2016-06-05configfile: bake the "Creator" gocryptfs version into the fileJakob Unterwurzacher
This field is added for the convenience of users and may help them to identify which gocryptfs version they need to mount a filesystem. The same information is essentially contained in FeatureFlags, but this is more difficult to decode for humans. It is completely ignored programmatically (also by older gocryptfs versions).
2016-06-04main: don't tell the user to choose a password when -extpass is usedJakob Unterwurzacher
Instead, print this: Using password provided via -extpass.