Skip to content

Commit

Permalink
nametransform: Create *.name files with 0400 permission.
Browse files Browse the repository at this point in the history
Similar to gocryptfs.iv files they are never modified.
  • Loading branch information
slackner authored and rfjakob committed Jan 9, 2019
1 parent b22cc03 commit aae45b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/nametransform/longnames.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit aae45b4

Please sign in to comment.