libgocryptfs/internal
Jakob Unterwurzacher 7d38f80a78 nametransform: WriteDirIV: replace ioutil.WriteFile
As reported at https://github.com/rfjakob/gocryptfs/issues/105 ,
the "ioutil.WriteFile(file, iv, 0400)" call causes "permissions denied"
errors on an NFSv4 setup.

"strace"ing diriv creation and gocryptfs.conf creation shows this:

conf (works on the user's NFSv4 mount):
openat(AT_FDCWD, "/tmp/a/gocryptfs.conf.tmp", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0400) = 3

diriv (fails):
openat(AT_FDCWD, "/tmp/a/gocryptfs.diriv", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0400) = 3

This patch creates the diriv file with the same flags that are used for
creating the conf:
openat(AT_FDCWD, "/tmp/a/gocryptfs.diriv", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0400) = 3

Closes https://github.com/rfjakob/gocryptfs/issues/105
2017-04-29 14:15:13 +02:00
..
configfile Add -forcedecode 2017-04-23 23:11:56 +02:00
contentenc forcedecode: tighten checks 2017-04-24 00:25:02 +02:00
cryptocore Add -forcedecode 2017-04-23 23:11:56 +02:00
ctlsock ctlsock: handle non-canonical empty paths 2017-02-05 18:17:30 +01:00
exitcodes exitcodes: define code 12 for "password incorrect" 2017-02-26 19:25:23 +01:00
fusefrontend forcedecode: tighten checks 2017-04-24 00:25:02 +02:00
fusefrontend_reverse Add -forcedecode 2017-04-23 23:11:56 +02:00
nametransform nametransform: WriteDirIV: replace ioutil.WriteFile 2017-04-29 14:15:13 +02:00
prefer_openssl prefer_openssl: default to Go GCM on OSX 2016-12-10 21:04:17 +01:00
readpassword readpassword: increase max password length to 2000 2017-03-20 09:29:56 +01:00
serialize_reads serialize_reads: add read serialization logic 2017-03-18 16:18:00 +01:00
siv_aead full stack: implement HKDF support 2017-03-05 21:59:55 +01:00
speed Add -forcedecode 2017-04-23 23:11:56 +02:00
stupidgcm forcedecode: tighten checks 2017-04-24 00:25:02 +02:00
syscallcompat syscallcompat: OSX compat: fix variable warnings 2017-02-16 19:23:17 +01:00
tlog Drop Go 1.4 compatability code everywhere 2017-03-05 17:44:14 +01:00