k9core

Coreutils for *nix operating systems
git clone git://bvnf.space/k9core.git
Log | Files | Refs | LICENSE

commit c6c4b61fb79e1db9be92837626609ea676dcdaff
parent 1d0891f7d8a4569f69cc9cf2f018be8c8996442c
Author: aabacchus <ben@bvnf.space>
Date:   Tue, 14 Sep 2021 17:15:14 +0100

tee: fix permissions when creating a file

Diffstat:
Msrc/tee.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tee.c b/src/tee.c @@ -54,7 +54,7 @@ main(int argc, char *argv[]) } else { if(append) FLAGS = O_RDWR | O_APPEND; /* Remember what I said? */ - fd = open(argv[optind], FLAGS); + fd = open(argv[optind], FLAGS, 0644); if(fd == -1) { fprintf(stderr, "tee: %s: %s\n", argv[optind], strerror(errno)); return 1;