aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-01-10 08:06:09 +0100
committerJakob Unterwurzacher2021-01-10 08:07:10 +0100
commitbed60101f4925eb2cce736301f5cc45ad267c187 (patch)
treef843eaf600da809918f581996ed1001201d4cefe /tests
parent6b492fdcb8f2a95c6a5dd57b445b3551b541f4ae (diff)
nametransform: make `gocryptfs.diriv` and `gocryptfs.xxx.name` files world-readable
Make `gocryptfs.diriv` and `gocryptfs.xxx.name` files world-readable to make encrypted backups easier when mounting via fstab. Having the files follow chmod/chown of their parent does not seem to be worth the hassle. The content of the diriv files is not secret, and both diriv and name files are protected by the perms of the parent dir. Fixes https://github.com/rfjakob/gocryptfs/issues/539
Diffstat (limited to 'tests')
-rw-r--r--tests/cli/cli_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/cli/cli_test.go b/tests/cli/cli_test.go
index 6aa2feb..2872592 100644
--- a/tests/cli/cli_test.go
+++ b/tests/cli/cli_test.go
@@ -59,8 +59,10 @@ func TestInitFilePerms(t *testing.T) {
syscall.Stat(dir+"/gocryptfs.diriv", &st)
perms = st.Mode & 0777
// From v1.7.1, these are created with 0440 permissions, see
- // https://github.com/rfjakob/gocryptfs/issues/387
- if perms != 0440 {
+ // https://github.com/rfjakob/gocryptfs/issues/387 .
+ // From v2.0, created with 0444 perms, see
+ // https://github.com/rfjakob/gocryptfs/issues/539 .
+ if perms != 0444 {
t.Errorf("Wrong permissions for gocryptfs.diriv: %#o", perms)
}
}