]> err.no Git - systemd/commitdiff
util: make touched files non-writable by default
authorLennart Poettering <lennart@poettering.net>
Wed, 16 Mar 2011 01:58:05 +0000 (02:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 16 Mar 2011 01:58:05 +0000 (02:58 +0100)
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);