diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-10-28 15:35:19 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-11-08 15:48:32 +0900 |
commit | 23fd04e92d8b260e8ba326f6e62ccf7a4076ff44 (patch) | |
tree | 543ee006a549384f2b4870e152565552f8d4e15f /test | |
parent | d18aff042273112b07e77bb56023b08c71a5f0b2 (diff) | |
download | systemd-23fd04e92d8b260e8ba326f6e62ccf7a4076ff44.tar.gz |
test: add test for ReadOnlyPaths= with RuntimeDirectory=
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 1 | ||||
-rw-r--r-- | test/test-execute/exec-readonlypaths-with-bindpaths.service | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build index 5e98ec6e50..bc37946bab 100644 --- a/test/meson.build +++ b/test/meson.build @@ -81,6 +81,7 @@ test_data_files = ''' test-execute/exec-protectkernelmodules-yes-mount-propagation.service test-execute/exec-read-only-path-succeed.service test-execute/exec-readonlypaths-mount-propagation.service + test-execute/exec-readonlypaths-with-bindpaths.service test-execute/exec-readonlypaths.service test-execute/exec-readwritepaths-mount-propagation.service test-execute/exec-restrict-namespaces-mnt-blacklist.service diff --git a/test/test-execute/exec-readonlypaths-with-bindpaths.service b/test/test-execute/exec-readonlypaths-with-bindpaths.service new file mode 100644 index 0000000000..ea9211395d --- /dev/null +++ b/test/test-execute/exec-readonlypaths-with-bindpaths.service @@ -0,0 +1,9 @@ +[Unit] +Description=Test for ReadOnlyPaths= + +[Service] +ReadOnlyPaths=/etc -/i-dont-exist /usr +# From 6c47cd7d3bf35c8158a0737f34fe2c5dc95e72d6, RuntimeDirectory= implies BindPaths=. +RuntimeDirectory=foo +ExecStart=/bin/sh -x -c 'test ! -w /etc && test ! -w /usr && test ! -e /i-dont-exist && test -w /var' +Type=oneshot |