]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: fix access mode of root inode of throw-away container images
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Nov 2024 09:17:36 +0000 (10:17 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 29 Nov 2024 13:26:57 +0000 (14:26 +0100)
Otherwise the root inode will typically have what mkdtemp sets up, which
is something like 0700, which is weird and somewhat broken when trying
to look into containers from unpriv users.

(cherry picked from commit c18a1024643809c8f28799900af4e6202623f934)

test/units/util.sh

index 80ae8ffc5b5168d4e61e36c035463805dd95349f..ccb194df8dc8d7b89d2f7a2c4d39133c433b3884 100755 (executable)
@@ -173,6 +173,7 @@ create_dummy_container() {
     fi
 
     mkdir -p "$root"
+    chmod 555 "$root"
     cp -a /usr/share/TEST-13-NSPAWN-container-template/* "$root"
     coverage_create_nspawn_dropin "$root"
 }