]>
Commit | Line | Data |
---|---|---|
f0e018e7 YW |
1 | [Unit] |
2 | Description=Test for BindPaths= and BindReadOnlyPaths= | |
3 | ||
4 | [Service] | |
5 | Type=oneshot | |
6 | # Create a file in /tmp/test-exec-bindpaths | |
42345b17 | 7 | ExecStart=touch /tmp/test-exec-bindpaths/thisisasimpletest |
f0e018e7 | 8 | # Then, the file can be access through /tmp |
42345b17 | 9 | ExecStart=test -f /tmp/thisisasimpletest |
f0e018e7 | 10 | # Also, through /tmp/test-exec-bindreadonlypaths |
42345b17 | 11 | ExecStart=test -f /tmp/test-exec-bindreadonlypaths/thisisasimpletest |
f0e018e7 YW |
12 | # The file cannot modify through /tmp/test-exec-bindreadonlypaths |
13 | ExecStart=/bin/sh -x -c '! touch /tmp/test-exec-bindreadonlypaths/thisisasimpletest' | |
14 | # Cleanup | |
42345b17 | 15 | ExecStart=rm /tmp/thisisasimpletest |
f0e018e7 YW |
16 | BindPaths=/tmp:/tmp/test-exec-bindpaths |
17 | BindReadOnlyPaths=/tmp:/tmp/test-exec-bindreadonlypaths |