]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-remote test: add -Z for mkdir in general
authorCathy Hu <cathy.hu@suse.com>
Fri, 23 Jan 2026 09:52:36 +0000 (10:52 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 6 Feb 2026 06:15:10 +0000 (15:15 +0900)
Otherwise on SELinux enabled systems with the "targeted" policy
the type is not set correctly when run via unconfined user and
the test fails.

test/units/TEST-04-JOURNAL.journal-remote.sh

index 7a36df190a8b428fc9afe903dd49117a08975980..5d4b13d70e0547e3ed3fa64f761a88989af2334b 100755 (executable)
@@ -41,7 +41,7 @@ journalctl --sync
 #
 # Note: older OpenSSL requires a config file with some extra options, unfortunately
 # Note2: /run here is used on purpose, since the systemd-journal-remote service uses PrivateTmp=yes
-mkdir -p /run/systemd/journal-remote-tls
+mkdir -pZ /run/systemd/journal-remote-tls
 cat >/tmp/openssl.conf <<EOF
 [ req ]
 prompt = no
@@ -97,7 +97,7 @@ rm -rf /var/log/journal/remote/*
 echo "$TEST_MESSAGE" | systemd-cat -t "$TEST_TAG"
 journalctl --sync
 
-mkdir -p /run/systemd/remote-pki
+mkdir -pZ /run/systemd/remote-pki
 cat >/run/systemd/remote-pki/ca.conf <<EOF
 [ req ]
 prompt = no