util: make touched files non-writable by default

This commit is contained in:
Lennart Poettering 2011-03-16 02:58:05 +01:00
parent a258bf2648
commit 14f3c8252b

View file

@ -3524,7 +3524,7 @@ int touch(const char *path) {
assert(path);
if ((fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666)) < 0)
if ((fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0644)) < 0)
return -errno;
close_nointr_nofail(fd);