Jakob Unterwurzacher
9ecb489c66
Allow "-d" as an alis for "-debug", and "-quiet" as an alias for "-q"
2016-01-24 18:20:04 +01:00
Jakob Unterwurzacher
523e430685
Add "-nosyslog" options
...
Also, actually redirect Warn and Debug as well.
2016-01-24 18:10:18 +01:00
Jakob Unterwurzacher
1030522fe6
Suppress password prompt when using -extpass
...
Also, add color to the error messages.
2016-01-23 20:18:39 +01:00
Jakob Unterwurzacher
2e419e635f
Remove last SetOutput from generic code
2016-01-22 21:49:56 +01:00
Jakob Unterwurzacher
cec2da3e33
Add "-memprofile" option
2016-01-21 23:55:37 +01:00
Jakob Unterwurzacher
d163169655
Wrap Logger to make disabling output more efficient
...
Instead of using SetOutput(ioutil.Discard), which means
that Printf is still called for every debug message,
use a simple and fast boolean check.
Streaming write performance improves from 86 to 93 MB/s.
2016-01-21 22:59:11 +01:00
Jakob Unterwurzacher
9bab220a1b
Switch to syslog when running in the background
2016-01-20 22:31:15 +01:00
Jakob Unterwurzacher
17f0eb1339
Convert logging to standard Go log.Logger
...
This is in preparation of logging to syslog.
2016-01-20 20:57:00 +01:00
Jakob Unterwurzacher
1936de783f
Color for the "init success" message
2016-01-04 20:55:25 +01:00
Jakob Unterwurzacher
ad00ba38e5
Colorize output
2015-12-19 15:46:19 +01:00
Jakob Unterwurzacher
1caa925868
Increase GCM IV size from 96 to 128 bits
...
This pushes back the birthday bound for collisions to make it virtually
irrelevant.
2015-12-19 15:02:29 +01:00
Jakob Unterwurzacher
e99e841713
Rmdir: handle creating and removing unreadable directories
...
This patch also splits off Mkdir and Rmdir into its own file.
Fixes issue #8 , thanks to @diseq for the bug report.
2015-12-11 20:02:12 +01:00
Jakob Unterwurzacher
b4b9072cc2
Simplify CreateConfFile: do not allow specification of EMENames
2015-12-10 19:38:02 +01:00
Jakob Unterwurzacher
ccf6d00728
Add missing PlaintextNames checks in OpenDir, Mkdir, Rmdir, initDir
...
Plaintextnames support has bitrotted during the DirIV additions,
this needs test cases. Will be added in a future patch.
Fixes issue #9 .
2015-12-10 01:12:05 +01:00
Jakob Unterwurzacher
c6dacd6f91
Add EME filename encryption & enable it by default
2015-12-08 16:17:04 +01:00
Jakob Unterwurzacher
71b94828ed
init: create gocryptfs.diriv after creating gocryptfs.conf
...
Creating the config file can fail easily, for example if the
password is not entered the same twice. This would leave an
orphaned gocryptfs.diriv behind.
2015-12-06 14:24:45 +01:00
Jakob Unterwurzacher
ce42a6f23d
Run go fmt
2015-11-29 21:55:20 +01:00
Jakob Unterwurzacher
6f764b3867
Handle all operations except mounting without forking a child
...
This saves 170ms for each start (why do we take 170ms to start up?)
and cuts down test time by 2 seconds.
2015-11-29 19:09:12 +01:00
Jakob Unterwurzacher
bb116282b7
Add "-scryptn" option that sets the cost parameter for scrypt
...
Use that option to speed up the automated tests by 7 seconds.
Before:
ok github.com/rfjakob/gocryptfs/integration_tests 26.667s
After:
ok github.com/rfjakob/gocryptfs/integration_tests 19.534s
2015-11-29 18:53:40 +01:00
Jakob Unterwurzacher
1fb349e97b
diriv: also support old CBC symlink
2015-11-28 18:39:45 +01:00
Jakob Unterwurzacher
fe7355f9ee
diriv: use "DirIV" flag to discern and support mounting old filesystems
2015-11-28 18:38:06 +01:00
Jakob Unterwurzacher
b3d96b6a20
main: pass args struct instead of having a huge function call
2015-11-27 22:30:38 +01:00
Jakob Unterwurzacher
a04a92cdab
Run go fmt
2015-11-27 22:20:01 +01:00
Jakob Unterwurzacher
6acd772cf9
diriv: Define "DirIV" feature flag
...
(unused so far)
2015-11-27 22:18:36 +01:00
Jakob Unterwurzacher
4d466c3412
diriv: Create gocryptfs.diriv in every directory
2015-11-25 20:57:16 +01:00
Jakob Unterwurzacher
df46548be6
Print newline after gocryptfs.conf not found error
2015-11-25 20:57:16 +01:00
Jakob Unterwurzacher
09499be6e9
Move "Debug output enabled" after forkChild() to remove duplicate output
2015-11-15 13:56:01 +01:00
Jakob Unterwurzacher
d95fc2333a
Add "-extpass" cli option and associated tests
2015-11-15 13:42:04 +01:00
Jakob Unterwurzacher
066c2c90eb
MANPAGE: add "-config" flag
...
Also, "-plaintextnames" can be used with -zerokey.
Fix the incorrect description.
2015-11-14 21:31:39 +01:00
Jakob Unterwurzacher
58592330dc
Refactor cli argument handling
...
Also, add the "-config" option for storing gocryptfs.conf
outside of CIPHERDIR.
2015-11-14 21:25:10 +01:00
Jakob Unterwurzacher
6736212b29
README: add beta badge and update text
...
Also, improve the help text.
2015-11-14 19:15:51 +01:00
Jakob Unterwurzacher
61aacb5c1b
Run go fmt and go vet
2015-11-14 17:16:17 +01:00
Jakob Unterwurzacher
e43733ca0d
Also hide master key reminder with "-q"
...
Also fix missing newline after password prompt
2015-11-09 23:33:35 +01:00
Jakob Unterwurzacher
51fcf61630
Use new arg "-notifypid" for more robust daemonization
...
No more string matching on the parent command line!
2015-11-09 23:33:35 +01:00
Jakob Unterwurzacher
273d8086ae
cli: Create our own FlagSet so we can set the policy to ExitOnError
2015-11-09 23:33:29 +01:00
Jakob Unterwurzacher
99dfc84992
Add "-q" (quiet) flag
2015-11-09 22:33:42 +01:00
Jakob Unterwurzacher
765411cc70
tests: check that the filename encryption is working as expected
...
Also check that the "gocryptfs.conf" path filtering is working
as expected
2015-11-03 22:27:11 +01:00
Jakob Unterwurzacher
3e367b29b0
config: Introduce ext4-style feature flags
...
// List of feature flags this filesystem has enabled.
// If gocryptfs encounters a feature flag it does not support, it will refuse
// mounting. This mechanism is analogous to the ext4 feature flags that are
// stored in the superblock.
FeatureFlags []string
2015-11-03 21:05:47 +01:00
Jakob Unterwurzacher
1ec0fa388d
Update USAGE.txt
...
Also run go fmt
2015-11-03 00:06:04 +01:00
Jakob Unterwurzacher
de56fe9e35
Implement PlainTextNames mode
...
Also, forbid access to "gocryptfs.conf" in the root dir.
2015-11-03 00:00:13 +01:00
Jakob Unterwurzacher
0ec17c3939
Add "--plaintextnames" option
...
Also, gather all the command line arguments into an anonymous struct
"args".
2015-11-02 23:09:51 +01:00
Jakob Unterwurzacher
a324407082
Fix three "golint" nitpicks
2015-11-02 22:51:12 +01:00
Jakob Unterwurzacher
c272e3042f
Fix daemonization regression
...
Commit af923d2d16
broke daemonization.
Revert the change but get rid of the warning message when running
in the foreground.
2015-11-01 15:21:34 +01:00
Jakob Unterwurzacher
3f490d4d86
Bake version string into binary, add "--version" switch
...
Example:
./gocryptfs -version
gocryptfs v0.2-20-gabcef9e-dirty; on-disk format 1
Note that you MUST compile using "./build.bash" for this to work.
2015-11-01 14:04:29 +01:00
Jakob Unterwurzacher
af923d2d16
Automatically lazy-unmount when we get SIGINT or SIGTERM
...
This hides the dangling "Transport endpoint is not connected"
mountpoint for everyone but processes that have file open inside
the mountpoint.
2015-11-01 13:28:58 +01:00
Jakob Unterwurzacher
e31d319c39
Remove code detected by "deadcode"
...
go get github.com/remyoudompheng/go-misc/deadcode
2015-11-01 12:32:10 +01:00
Jakob Unterwurzacher
242fcd0736
Run gofmt
2015-10-11 18:51:56 +02:00
Jakob Unterwurzacher
d1d444435c
main: check directories for existence early
...
This prevents that the user enters the password only to get an error
later.
2015-10-11 18:33:28 +02:00
Jakob Unterwurzacher
14115b061b
Add native daemonization
2015-10-11 18:02:48 +02:00
Jakob Unterwurzacher
39183bea00
Rename sendSig to sendUsr1
...
This matches waitForUsr1 in daemonize()
2015-10-11 18:01:47 +02:00