diff options
author | Thomas White <taw@physics.org> | 2014-05-22 14:33:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-05-22 14:33:51 +0200 |
commit | 8c76ffc087dc1f900125b8669d3460b7ea52f14c (patch) | |
tree | 2158ff00a46c224e8a1389ee1f7a0b874d169470 /src/indexamajig.c | |
parent | 947fb90facb9afd6b5bbc1e7762644c073955a71 (diff) |
Fix permissions of newly created stream files
The user's umask should prevent all the streams from being (eg) world writable.
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 143a0d82..9102ccc5 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -627,7 +627,8 @@ int main(int argc, char *argv[]) } - ofd = open(outfile, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR); + ofd = open(outfile, O_CREAT | O_TRUNC | O_WRONLY, + S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if ( ofd == -1 ) { ERROR("Failed to open stream '%s'\n", outfile); return 1; |