Fixed permissions of eventually created output file
This commit is contained in:
parent
bf0dedae2c
commit
3f6b6f73a3
@ -89,7 +89,8 @@ help:;
|
|||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
exit(4);
|
exit(4);
|
||||||
if(strcmp(out_path,"-")!=0) {
|
if(strcmp(out_path,"-")!=0) {
|
||||||
out_fd= open(out_path, O_WRONLY|O_CREAT|O_TRUNC);
|
out_fd= open(out_path, O_WRONLY | O_CREAT | O_TRUNC,
|
||||||
|
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||||
if(out_fd == -1) {
|
if(out_fd == -1) {
|
||||||
fprintf(stderr, "Cannot open file: %s\n", out_path);
|
fprintf(stderr, "Cannot open file: %s\n", out_path);
|
||||||
fprintf(stderr, "Error reported: '%s' (%d)\n",strerror(errno), errno);
|
fprintf(stderr, "Error reported: '%s' (%d)\n",strerror(errno), errno);
|
||||||
|
Loading…
Reference in New Issue
Block a user