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:
@@ -3,6 +3,7 @@
|
||||
set -e
|
||||
|
||||
datagen > file
|
||||
chmod 642 file
|
||||
|
||||
zstd file -q --trace-file-stat -o file.zst
|
||||
zstd -tq file.zst
|
||||
|
||||
@@ -35,7 +35,7 @@ Trace:FileStat: > UTIL_stat(file.zst)
|
||||
Trace:FileStat: < 1
|
||||
Trace:FileStat: > UTIL_utime(file.zst)
|
||||
Trace:FileStat: < 0
|
||||
Trace:FileStat: > UTIL_chmod(file.zst, 420)
|
||||
Trace:FileStat: > UTIL_chmod(file.zst, 418)
|
||||
Trace:FileStat: > chmod
|
||||
Trace:FileStat: < 0
|
||||
Trace:FileStat: < 0
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
set -e
|
||||
|
||||
datagen | zstd -q > file.zst
|
||||
chmod 642 file.zst
|
||||
|
||||
zstd -dq --trace-file-stat file.zst
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user