mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
72a1db0bb2
Apparently, world-writable bpffs is intended by the kernel folks, hence let's make sure we don't choke on it on our tests.
20 lines
904 B
Desktop File
20 lines
904 B
Desktop File
[Unit]
|
|
Description=Test DynamicUser= with StateDirectory=
|
|
|
|
[Service]
|
|
ExecStart=/bin/sh -c 'test -w /var/lib/waldo'
|
|
ExecStart=/bin/sh -c 'test -w /var/lib/quux/pief'
|
|
ExecStart=/bin/sh -c 'touch /var/lib/waldo/yay'
|
|
ExecStart=/bin/sh -c 'touch /var/lib/quux/pief/yayyay'
|
|
ExecStart=/bin/sh -c 'test -f /var/lib/waldo/yay'
|
|
ExecStart=/bin/sh -c 'test -f /var/lib/quux/pief/yayyay'
|
|
ExecStart=/bin/sh -c 'test -f /var/lib/private/waldo/yay'
|
|
ExecStart=/bin/sh -c 'test -f /var/lib/private/quux/pief/yayyay'
|
|
|
|
# Make sure that /var/lib/private/waldo is really the only writable directory besides the obvious candidates
|
|
ExecStart=/bin/sh -x -c 'test $$(find / -type d -writable 2> /dev/null | egrep -v -e \'^(/var/tmp$$|/tmp$$|/proc/|/dev/mqueue$$|/dev/shm$$|/sys/fs/bpf$$)\' | sort -u | tr -d '\\\\n') = /var/lib/private/quux/pief/var/lib/private/waldo'
|
|
|
|
Type=oneshot
|
|
DynamicUser=yes
|
|
StateDirectory=waldo quux/pief
|