X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxmisc.c;h=4c6a76707d1f77484d975d39f272c953e74932fe;hb=12e019bafc75cb441e965c63e15dfceeaf71ca1e;hp=dc20863702d29484bca5d5a1895dacb6f98a807a;hpb=4fa9564c909c589bcccc95d57fae5469063c1759;p=PuTTY.git 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;