summaryrefslogtreecommitdiff
path: root/tests/testsuite.at
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/testsuite.at
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/testsuite.at')
-rw-r--r--tests/testsuite.at1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 0769e71b..a99cdeee 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -502,6 +502,7 @@ m4_include([xattr04.at])
m4_include([xattr05.at])
m4_include([xattr06.at])
m4_include([xattr07.at])
+m4_include([xattr08.at])
m4_include([acls01.at])
m4_include([acls02.at])