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