From 8c76ffc087dc1f900125b8669d3460b7ea52f14c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 22 May 2014 14:33:51 +0200 Subject: Fix permissions of newly created stream files The user's umask should prevent all the streams from being (eg) world writable. --- src/indexamajig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3