[libglnx/wip/noxattr] tests: Don't copy extended attributes when testing pseudo-files




commit b6ee0e242347617a461f6ab60ce03d25df503c95
Author: Simon McVittie <smcv debian org>
Date:   Tue Feb 22 10:26:39 2022 +0000

    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>

 tests/test-libglnx-fdio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]