mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 07:30:30 +00:00
test: make sure that {readonly|inaccessible|readwrite}paths disconnect mount propagation
Better safe.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test to make sure that InaccessiblePaths= disconnect mount propagation
|
||||
|
||||
[Service]
|
||||
InaccessiblePaths=-/i-dont-exist
|
||||
ExecStart=/bin/sh -x -c 'mkdir -p /TEST; mount -t tmpfs tmpfs /TEST; grep TEST /proc/self/mountinfo && ! grep TEST /proc/$${PPID}/mountinfo && ! grep TEST /proc/1/mountinfo'
|
||||
Type=oneshot
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test to make sure that passing ReadOnlyPaths= disconnect mount propagation
|
||||
|
||||
[Service]
|
||||
ReadOnlyPaths=-/i-dont-exist
|
||||
ExecStart=/bin/sh -x -c 'mkdir -p /TEST; mount -t tmpfs tmpfs /TEST; grep TEST /proc/self/mountinfo && ! grep TEST /proc/$${PPID}/mountinfo && ! grep TEST /proc/1/mountinfo'
|
||||
Type=oneshot
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test to make sure that passing ReadWritePaths= disconnect mount propagation
|
||||
|
||||
[Service]
|
||||
ReadWritePaths=-/i-dont-exist
|
||||
ExecStart=/bin/sh -x -c 'mkdir -p /TEST; mount -t tmpfs tmpfs /TEST; grep TEST /proc/self/mountinfo && ! grep TEST /proc/$${PPID}/mountinfo && ! grep TEST /proc/1/mountinfo'
|
||||
Type=oneshot
|
||||
Reference in New Issue
Block a user