diff options
author | Tharre <tharre3@gmail.com> | 2015-01-09 09:10:43 +0100 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2015-01-09 09:10:43 +0100 |
commit | 7bfb57149818404e10610b1fa1f05989a8fc1b06 (patch) | |
tree | a3349ae62c91298e0005621635320e3540dae3d4 /src | |
parent | a5277a4901ffa93e8b7996b9e3dd030b72551210 (diff) | |
download | redo-7bfb57149818404e10610b1fa1f05989a8fc1b06.tar.gz redo-7bfb57149818404e10610b1fa1f05989a8fc1b06.tar.xz redo-7bfb57149818404e10610b1fa1f05989a8fc1b06.zip |
Fix the mode argument of open()
Diffstat (limited to 'src')
-rw-r--r-- | src/build.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |