diff options
author | John Kohl <jtkohl@mit.edu> | 1989-11-28 09:48:05 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1989-11-28 09:48:05 +0000 |
commit | 1613873d10e5fdf5db7b25031aa018c586701735 (patch) | |
tree | c0956621434d7e3172b4600c227480b8ddccb63e | |
parent | 184c48434bd35eb77cf99ca13a5484f52a58d231 (diff) |
frob umask with writable files (create_file_output_port)
-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; |