summaryrefslogtreecommitdiff
path: root/internal/cryptocore/hkdf.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-04-29 14:15:13 +0200
committerJakob Unterwurzacher2017-04-29 14:15:13 +0200
commit7d38f80a78644c8ec4900cc990bfb894387112ed (patch)
treeef93c700d0a62135ad6e77463637bdea733f8479 /internal/cryptocore/hkdf.go
parent3409ade2723d931097560fbbe35e461553c5912c (diff)
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
Diffstat (limited to 'internal/cryptocore/hkdf.go')
0 files changed, 0 insertions, 0 deletions