diff options
Diffstat (limited to 'zwgc/port.c')
-rw-r--r-- | zwgc/port.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zwgc/port.c b/zwgc/port.c index 315f9ae..d8af0d5 100644 --- a/zwgc/port.c +++ b/zwgc/port.c @@ -524,9 +524,13 @@ void create_file_output_port(name, filename) string filename; { FILE *out; + int oumask; errno = 0; + + oumask = umask(077); /* allow read/write for us only */ out = fopen(filename, "w"); + (void) umask(oumask); if (errno) { var_set_variable("error", perror_to_string(errno)); return; |