mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 18:55:09 +03:00
test: add more tests for SupplementaryGroups=
This commit is contained in:
parent
86b838eaa3
commit
bf9ace96fc
@ -1628,6 +1628,8 @@ EXTRA_DIST += \
|
||||
test/test-execute/exec-group.service \
|
||||
test/test-execute/exec-group-nfsnobody.service \
|
||||
test/test-execute/exec-supplementarygroups.service \
|
||||
test/test-execute/exec-supplementarygroups-single-group.service \
|
||||
test/test-execute/exec-supplementarygroups-single-group-user.service \
|
||||
test/test-execute/exec-ignoresigpipe-no.service \
|
||||
test/test-execute/exec-ignoresigpipe-yes.service \
|
||||
test/test-execute/exec-personality-x86-64.service \
|
||||
|
@ -220,6 +220,8 @@ static void test_exec_group(Manager *m) {
|
||||
|
||||
static void test_exec_supplementary_groups(Manager *m) {
|
||||
test(m, "exec-supplementarygroups.service", 0, CLD_EXITED);
|
||||
test(m, "exec-supplementarygroups-single-group.service", 0, CLD_EXITED);
|
||||
test(m, "exec-supplementarygroups-single-group-user.service", 0, CLD_EXITED);
|
||||
}
|
||||
|
||||
static void test_exec_environment(Manager *m) {
|
||||
|
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Test for Supplementary Group with only one group and uid 1
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'test "$$(id -G)" = "1" && test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
|
||||
Type=oneshot
|
||||
User=1
|
||||
Group=1
|
||||
SupplementaryGroups=1
|
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Test for Supplementary Group with only one group
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c 'test "$$(id -G)" = "1" && test "$$(id -g)" = "1" && test "$$(id -u)" = "0"'
|
||||
Type=oneshot
|
||||
Group=1
|
||||
SupplementaryGroups=1
|
Loading…
Reference in New Issue
Block a user