From 14f3c8252b4dd73bff778b5af9f872e929bd566c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 16 Mar 2011 02:58:05 +0100 Subject: [PATCH] util: make touched files non-writable by default --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5