From e41356ff1a423bcc7bbe3fbbc36407aa067c76e0 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 2 Oct 2011 14:16:08 +0000 Subject: [PATCH] Private files saved on Unix should have mode 0600, not 0700. They're generally private-key files, which have no need to be executable. git-svn-id: svn://svn.tartarus.org/sgt/putty@9321 cda61777-01e9-0310-a592-d414129be87e --- unix/uxmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/uxmisc.c b/unix/uxmisc.c index 7d577f96..8441349b 100644 --- a/unix/uxmisc.c +++ b/unix/uxmisc.c @@ -174,7 +174,7 @@ FILE *f_open(const Filename *filename, char const *mode, int is_private) int fd; assert(mode[0] == 'w'); /* is_private is meaningless for read, and tricky for append */ - fd = open(filename->path, O_WRONLY | O_CREAT | O_TRUNC, 0700); + fd = open(filename->path, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd < 0) return NULL; return fdopen(fd, mode); -- 2.11.0