diff options
Diffstat (limited to 'toys')
-rw-r--r-- | toys/lsb/gzip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/toys/lsb/gzip.c b/toys/lsb/gzip.c index df5bf3af..0fa9b7e1 100644 --- a/toys/lsb/gzip.c +++ b/toys/lsb/gzip.c @@ -143,6 +143,7 @@ static void do_gzip(int ifd, char *in) struct timespec times[] = {sb.st_atim, sb.st_mtim}; if (utimensat(AT_FDCWD, out, times, 0)) perror_exit("utimensat"); + if (chmod(out, sb.st_mode)) perror_exit("chmod"); close(ofd); if (!FLAG(k) && in && unlink(in)) perror_msg("unlink %s", in); free(out); |