(doredir): Open the file with mode 0666 instead of 0600, for

consistency with redirections in pipes.  Users should use umask to
restrict permissions.
This commit is contained in:
Markus Armbruster 2007-11-17 14:36:03 +00:00
parent 8b7d0b915d
commit 0e506556c2

View file

@ -186,7 +186,7 @@ doredir(char *p)
return; return;
} }
fd = open(p, mode, 0600); fd = open(p, mode, 0666);
redir_fp = fd < 0 ? NULL : fdopen(fd, "w"); redir_fp = fd < 0 ? NULL : fdopen(fd, "w");
if (!redir_fp) { if (!redir_fp) {
fprintf(stderr, "Can't redirect to %s: %s\n", fprintf(stderr, "Can't redirect to %s: %s\n",