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
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ func (f *BoltSnapshotStore) getMetaFromDB(id string) (*raft.SnapshotMeta, error)
} }
filename := filepath.Join(f.path, id, databaseFilename) 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 { if err != nil {
return nil, err return nil, err
} }