aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/longnames.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-09 02:49:24 +0100
committerJakob Unterwurzacher2019-01-09 20:42:18 +0100
commitaae45b4d77082c8bd54575eaf7b48794d8d53e9e (patch)
treea40dbc5cff7ce986c0977fcfc25a333ffd8c1c10 /internal/nametransform/longnames.go
parentb22cc03c7516b2003880db8375d26c76d6dff093 (diff)
nametransform: Create *.name files with 0400 permission.
Similar to gocryptfs.iv files they are never modified.
Diffstat (limited to 'internal/nametransform/longnames.go')
-rw-r--r--internal/nametransform/longnames.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/nametransform/longnames.go b/internal/nametransform/longnames.go
index fc97a26..7a6d413 100644
--- a/internal/nametransform/longnames.go
+++ b/internal/nametransform/longnames.go
@@ -129,7 +129,7 @@ func (n *NameTransform) WriteLongNameAt(dirfd int, hashName string, plainName st
// Write the encrypted name into hashName.name
fdRaw, err := syscallcompat.Openat(dirfd, hashName+LongNameSuffix,
- syscall.O_WRONLY|syscall.O_CREAT|syscall.O_EXCL, 0600)
+ syscall.O_WRONLY|syscall.O_CREAT|syscall.O_EXCL, 0400)
if err != nil {
// Don't warn if the file already exists - this is allowed for renames
// and should be handled by the caller.