Debian Codegraph @

test/testdata/test-execute/exec-privatedevices-yes-with-group.service

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 [Unit]
3 Description=Test Group=group is applied after PrivateDevices=yes
4
5 [Service]
6 PrivateDevices=yes
7 Group=daemon
8 Type=oneshot
9
10 # Check the group applied
11 ExecStart=bash -x -c 'test "$$(id -n -g)" = "daemon"'
12
13 # Check that the namespace applied
14 ExecStart=bash -c 'test ! -c /dev/kmsg'
15
16 # Check that the owning group of a node is not daemon (should be the host root)
17 ExecStart=bash -x -c 'test ! "$$(stat -c %%G /dev/stderr)" = "daemon"'