1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-13 20:29:17 +00:00

secring: open with more secure umask

This commit is contained in:
Jörg Thalheim 2020-07-14 13:41:03 +01:00
parent 4eda6711ba
commit 8cdca9dd6d
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -306,7 +306,8 @@ func atomicSymlink(oldname, newname string) error {
func importSSHKeys(keyPaths []string, gpgHome string) error {
secringPath := filepath.Join(gpgHome, "secring.gpg")
secring, err := os.Create(secringPath)
secring, err := os.OpenFile(secringPath, os.O_WRONLY|os.O_CREATE, 0600)
if err != nil {
return fmt.Errorf("Cannot create %s: %s", secringPath, err)
}