Mimic gzip chown(gid), chmod(), chown(uid) Behavior

Avoids a race condition in which we unintentionally open up permissions to
the wrong group.
This commit is contained in:
W. Felix Handte
2023-01-18 11:57:54 -08:00
parent 1e3eba65a6
commit 0d2d460223
5 changed files with 18 additions and 4 deletions
@@ -31,7 +31,7 @@ Trace:FileStat: > UTIL_stat(file)
Trace:FileStat: < 1
Trace:FileStat: > UTIL_utime(file)
Trace:FileStat: < 0
Trace:FileStat: > UTIL_chmod(file, 420)
Trace:FileStat: > UTIL_chmod(file, 418)
Trace:FileStat: > chmod
Trace:FileStat: < 0
Trace:FileStat: < 0