From: Lennart Poettering Date: Wed, 16 Mar 2011 01:58:05 +0000 (+0100) Subject: util: make touched files non-writable by default X-Git-Tag: v21~70 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14f3c8252b4dd73bff778b5af9f872e929bd566c;p=systemd util: make touched files non-writable by default --- diff --git a/src/util.c b/src/util.c index eefd66e8..c9c88927 100644 --- a/src/util.c +++ b/src/util.c @@ -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);