From f95d2f25f35c5140acbec44aaf8078c3c0526a7b Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Mon, 18 Dec 2023 10:53:51 -0800 Subject: [PATCH] fix temporary history file permissions --- readline/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readline/history.go b/readline/history.go index db99fad0..d0138cd9 100644 --- a/readline/history.go +++ b/readline/history.go @@ -132,7 +132,7 @@ func (h *History) Save() error { tmpFile := h.Filename + ".tmp" - f, err := os.OpenFile(tmpFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC|os.O_APPEND, 0o666) + f, err := os.OpenFile(tmpFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC|os.O_APPEND, 0o600) if err != nil { return err }