commit b9c9f6396734350b659f1fadd46a238d38ae8ea7
parent 19269f8c4d3d2c2c277715e7b47d9d81ef2c1978
Author: Paul <paul@claws-mail.org>
Date: Wed, 14 Aug 2024 09:24:27 +0100
set chmod 0600 on history files
completes a4710c470e53b94c4fbd6a409456b95b18110b52
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/prefs_common.c b/src/prefs_common.c
@@ -1453,6 +1453,11 @@ static void prefs_common_save_history_to_dir(const gchar *dirname, const gchar *
goto out;
}
+ if (change_file_mode_rw(fp, history) < 0) {
+ FILE_OP_ERROR(history, "chmod");
+ g_warning("can't change file mode: %s", history);
+ }
+
for (cur = list; cur != NULL; cur = cur->next) {
TRY(claws_fputs((gchar *)cur->data, fp) != EOF &&
claws_fputc('\n', fp) != EOF);