chiark / gitweb /
util: make touched files non-writable by default
[elogind.git] / src / util.c
index eefd66e8cdb4b5e630213d5b4bd5b46365ae4457..c9c88927b0634c20eb5e4beee8d519cd3f03aaf1 100644 (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);