summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-12-28 16:30:21 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-03-13 11:53:59 +0900
commit7e46b29bd3f07814bf146d5cfcaf7969d6ad4d29 (patch)
tree5be22cbcc7a0ad7ddc3c092c01bcfb87d4c71894 /test
parent5beb8688e0b37e2ffb0efb9a1aa07aa3df8b0b62 (diff)
downloadsystemd-7e46b29bd3f07814bf146d5cfcaf7969d6ad4d29.tar.gz
test: add a testcase for ProtectHome=tmpfs vs ProtectSystem=strict
Diffstat (limited to 'test')
-rw-r--r--test/meson.build1
-rw-r--r--test/test-execute/exec-protecthome-tmpfs-vs-protectsystem-strict.service9
2 files changed, 10 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 796ad063c0..870f8bc6a7 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -94,6 +94,7 @@ test_data_files = '''
test-execute/exec-privatenetwork-yes.service
test-execute/exec-privatetmp-no.service
test-execute/exec-privatetmp-yes.service
+ test-execute/exec-protecthome-tmpfs-vs-protectsystem-strict.service
test-execute/exec-protectkernelmodules-no-capabilities.service
test-execute/exec-protectkernelmodules-yes-capabilities.service
test-execute/exec-protectkernelmodules-yes-mount-propagation.service
diff --git a/test/test-execute/exec-protecthome-tmpfs-vs-protectsystem-strict.service b/test/test-execute/exec-protecthome-tmpfs-vs-protectsystem-strict.service
new file mode 100644
index 0000000000..1522ff80e1
--- /dev/null
+++ b/test/test-execute/exec-protecthome-tmpfs-vs-protectsystem-strict.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Test ProtectHome=tmpfs vs ProtectSystem=strict
+# Test for #11276
+
+[Service]
+ProtectHome=tmpfs
+ProtectSystem=strict
+Type=oneshot
+ExecStart=/bin/sh -x -c 'test "$$(stat -fc %%T /home)" = "tmpfs"'