From 7bfb57149818404e10610b1fa1f05989a8fc1b06 Mon Sep 17 00:00:00 2001 From: Tharre Date: Fri, 9 Jan 2015 09:10:43 +0100 Subject: Fix the mode argument of open() --- src/build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/build.c b/src/build.c index e4a7c6b..70239e2 100644 --- a/src/build.c +++ b/src/build.c @@ -399,7 +399,8 @@ static void hash_file(const char *target, unsigned char *hash) { /* Write the dependency information into the specified path. */ static void write_dep_info(dep_info *dep) { - int out = open(dep->path, O_WRONLY | O_CREAT, 0644); + mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH; + int out = open(dep->path, O_WRONLY | O_CREAT, mode); if (out < 0) fatal("redo: failed to open %s", dep->path); -- cgit v1.2.3-70-g09d2