mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 18:53:33 +08:00
test: test DynamicUser= with SupplementaryGroups=
This commit is contained in:
parent
2b9ac11ed9
commit
5c67067f0e
@ -1628,6 +1628,7 @@ EXTRA_DIST += \
|
||||
test/test-execute/exec-supplementarygroups-multiple-groups-withuid.service \
|
||||
test/test-execute/exec-dynamicuser-fixeduser.service \
|
||||
test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service \
|
||||
test/test-execute/exec-dynamicuser-supplementarygroups.service \
|
||||
test/test-execute/exec-ignoresigpipe-no.service \
|
||||
test/test-execute/exec-ignoresigpipe-yes.service \
|
||||
test/test-execute/exec-personality-x86-64.service \
|
||||
|
@ -262,6 +262,7 @@ static void test_exec_supplementary_groups(Manager *m) {
|
||||
static void test_exec_dynamic_user(Manager *m) {
|
||||
test(m, "exec-dynamicuser-fixeduser.service", 0, CLD_EXITED);
|
||||
test(m, "exec-dynamicuser-fixeduser-one-supplementarygroup.service", 0, CLD_EXITED);
|
||||
test(m, "exec-dynamicuser-supplementarygroups.service", 0, CLD_EXITED);
|
||||
}
|
||||
|
||||
static void test_exec_environment(Manager *m) {
|
||||
|
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Test DynamicUser with SupplementaryGroups=
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'test "$$(id -G | cut -d " " --complement -f 1)" = "1 2 3"'
|
||||
Type=oneshot
|
||||
DynamicUser=yes
|
||||
SupplementaryGroups=1 2 3
|
Loading…
Reference in New Issue
Block a user