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:
parent
4eda6711ba
commit
8cdca9dd6d
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue