This allows users to touch files they have write access to, but aren't the
Also, remove utime.h include (not necessary since
4132561c17), and make sure to check the return
value of localtime (potentially preventing a NULL pointer derefence).
Currently, if the caller has a umask of 002 or 000, the file gets created as 644
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".
It actually makes the binaries smaller, the code easier to read
(gems like "val == true", "val == false" are gone) and actually
predictable in the sense of that we actually know what we're
working with (one bitwise operator was quite adventurous and
should now be fixed).
This is also more consistent with the other suckless projects
around which don't use boolean types.