summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-08-26 15:23:23 -0500
committerPaul Eggert <eggert@cs.ucla.edu>2022-08-26 16:39:16 -0500
commit0b74885e81b90d6ab4890b195dce99ca9109fe59 (patch)
tree6d4b3df349fa35a26b8c3bab24d469584791204a /tests/Makefile.am
parent258d1c44e5ee7c58b28bf0000e9d737df6081885 (diff)
downloadtar-0b74885e81b90d6ab4890b195dce99ca9109fe59.tar.gz
Fix bug with -x --xattr read-only files
Problem reported by Kevin Raymond in: https://bugzilla.redhat.com/show_bug.cgi?id=1886540 * src/extract.c (open_output_file): If we already created the empty file, do not open with O_EXCL, or with O_CREAT or O_TRUNC for that matter. Instead, use only O_NOFOLLOW to avoid some races. When estimating current mode, use openflag & O_EXCL rather than overwriting_old_files. (extract_file): Also invert S_IWUSR if it’s not set. * tests/xattr08.at: New test. * tests/Makefile.am, tests/testsuite.at: Add it.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eff8a3bf..a0ce690b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -275,6 +275,7 @@ TESTSUITE_AT = \
xattr05.at\
xattr06.at\
xattr07.at\
+ xattr08.at\
acls01.at\
acls02.at\
acls03.at\