Skip to content

Commit

Permalink
Merge pull request #7 from privacybydesign/relax-file-permission-chec…
Browse files Browse the repository at this point in the history
…k-on-Ed25519KeyPath

relax file permission check on Ed25519KeyPath
  • Loading branch information
sanderhollaar authored Dec 4, 2023
2 parents 757ff9c + d5a2f5e commit fb5f005
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,6 @@ func loadEd25519Key() {
log.Fatalf("os.Stat(%s): %v", conf.Ed25519KeyPath, err)
}

// This check is not perfect (ie. symlinks), but it helps a bit.
if fileInfo.Mode().Perm()&077 != 0 {
log.Fatalf("I don't trust the permission %#o on %s",
fileInfo.Mode().Perm(), conf.Ed25519KeyPath)
}

buf, err := os.ReadFile(conf.Ed25519KeyPath)
if err != nil {
log.Fatalf("Couldn't read %s: %v", conf.Ed25519KeyPath, err)
Expand Down

0 comments on commit fb5f005

Please sign in to comment.