From 1242e63b6ac5c25f61cf08397a849b3c022f3b51 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 29 Apr 2015 17:52:50 -0700 Subject: [PATCH] Use mode 0600 for history file Fixes #2041 --- history.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/history.cpp b/history.cpp index 23acc0455..a4ad54354 100644 --- a/history.cpp +++ b/history.cpp @@ -1405,7 +1405,7 @@ bool history_t::save_internal_via_rewrite() { /* It was successfully templated; try opening it atomically */ tmp_name = str2wcstring(narrow_str); - out_fd = wopen_cloexec(tmp_name, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC, 0644); + out_fd = wopen_cloexec(tmp_name, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC, 0600); } #endif free(narrow_str);