touch: Respect caller's umask
Currently, if the caller has a umask of 002 or 000, the file gets created as 644 anyway. Also, add O_WRONLY to the open call, since POSIX says that "Applications shall specify exactly one of the first five values (file access modes) below in the value of oflag".
This commit is contained in:
parent
a211649cfd
commit
0941c9ab2c
Loading…
Reference in New Issue
Block a user