From 70cd3df3068b06dace7b2d2a7b03496b4be70c1f Mon Sep 17 00:00:00 2001 From: oleiade Date: Tue, 17 Aug 2021 16:15:25 +0200 Subject: [PATCH] Ensure vault file is created with 0700 rights fixes #505 --- internal/trousseau/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/trousseau/actions.go b/internal/trousseau/actions.go index 2efba10..4c8fcb1 100644 --- a/internal/trousseau/actions.go +++ b/internal/trousseau/actions.go @@ -41,7 +41,7 @@ func CreateAction(ct CryptoType, ca CryptoAlgorithm, recipients []string) error return err } - f, err := os.OpenFile(InferStorePath(config), os.O_CREATE|os.O_WRONLY, os.ModeAppend) + f, err := os.OpenFile(InferStorePath(config), os.O_CREATE|os.O_WRONLY, 0700) if err != nil { return err }