diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-07-13 12:51:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-07-13 12:51:09 +0000 |
commit | 85ed638be3aea9c8ab6806a1fde248b10c2fee14 (patch) | |
tree | 247567f39cfc461307efa81d482a4a7ea05af098 /src/utilities | |
parent | 7fca0b937293ab5894f94538bf607dda8f58ab2e (diff) | |
download | s6-dns-85ed638be3aea9c8ab6806a1fde248b10c2fee14.tar.xz |
Bugfix the bigfuxes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/utilities')
-rw-r--r-- | src/utilities/s6-dns-hosts-compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utilities/s6-dns-hosts-compile.c b/src/utilities/s6-dns-hosts-compile.c index 4a38955..554a569 100644 --- a/src/utilities/s6-dns-hosts-compile.c +++ b/src/utilities/s6-dns-hosts-compile.c @@ -3,6 +3,7 @@ #include <string.h> #include <unistd.h> #include <stdlib.h> +#include <sys/stat.h> #include <stdio.h> #include <skalibs/sgetopt.h> @@ -48,6 +49,7 @@ int main (int argc, char const *const *argv) if (!s6dns_hosts_compile(fdr, fdw)) strerr_diefu4sys(111, "compile ", ifile, " to ", tmp) ; if (fsync(fdw) == -1) strerr_diefu2sys(111, "fsync ", tmp) ; + if (fchmod(fdw, 0644) == -1) strerr_diefu2sys(111, "fchmod ", tmp) ; if (rename(tmp, ofile) == -1) strerr_diefu4sys(111, "rename ", tmp, " to ", ofile) ; } return 0 ; |