summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2022-02-22 10:26:39 +0000
committerSimon McVittie <smcv@debian.org>2022-02-22 10:26:39 +0000
commitb6ee0e242347617a461f6ab60ce03d25df503c95 (patch)
tree4c0029a8b4e3f4ed49a8f70ece2c143419e856cc
parent983a818936ecdb1bb30d9ee7bec642684689b6ed (diff)
downloadlibglnx-b6ee0e242347617a461f6ab60ce03d25df503c95.tar.gz
tests: Don't copy extended attributes when testing pseudo-files
It seems that on SELinux systems, files in /proc have extended attributes that cannot be copied by an unprivileged user. Signed-off-by: Simon McVittie <smcv@debian.org>
-rw-r--r--tests/test-libglnx-fdio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-libglnx-fdio.c b/tests/test-libglnx-fdio.c
index 01ab1fc..b9aa682 100644
--- a/tests/test-libglnx-fdio.c
+++ b/tests/test-libglnx-fdio.c
@@ -268,7 +268,9 @@ test_filecopy_procfs (void)
if (!glnx_file_copy_at (AT_FDCWD, pseudo_files[i], NULL,
AT_FDCWD, "copy",
- GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_NOCHOWN,
+ (GLNX_FILE_COPY_OVERWRITE |
+ GLNX_FILE_COPY_NOCHOWN |
+ GLNX_FILE_COPY_NOXATTRS),
NULL, error))
return;