Use a mode when opening the db file that won't result in excessive perms. (#12160)

This commit is contained in:
Nick Cabatoff 2021-07-23 19:43:50 +02:00 committed by GitHub
parent 5181d024f7
commit f7ecb978a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,7 +210,7 @@ func (f *BoltSnapshotStore) getMetaFromDB(id string) (*raft.SnapshotMeta, error)
}
filename := filepath.Join(f.path, id, databaseFilename)
boltDB, err := bolt.Open(filename, 0o666, &bolt.Options{Timeout: 1 * time.Second})
boltDB, err := bolt.Open(filename, 0o600, &bolt.Options{Timeout: 1 * time.Second})
if err != nil {
return nil, err
}