X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/c6940f12e2ad6ba778324f50b9a779db36238518..48806a46f9015d25465585d9e0867a3aac8d7572:/unix/uxmisc.c diff --git a/unix/uxmisc.c b/unix/uxmisc.c index dc208637..4c6a7670 100644 --- a/unix/uxmisc.c +++ b/unix/uxmisc.c @@ -140,8 +140,9 @@ FILE *f_open(struct Filename filename, char const *mode, int is_private) if (!is_private) { return fopen(filename.path, mode); } else { + int fd; assert(mode[0] == 'w'); /* is_private is meaningless for read */ - int fd = open(filename.path, O_WRONLY | O_CREAT | O_TRUNC, + fd = open(filename.path, O_WRONLY | O_CREAT | O_TRUNC, 0700); if (fd < 0) return NULL;