summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--src/test/test-execute.c1
-rw-r--r--test/test-execute/exec-dynamicuser-supplementarygroups.service8
3 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 3226ea4549..f7652c2346 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 \
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index aa5a9f1695..6029853e3e 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -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) {
diff --git a/test/test-execute/exec-dynamicuser-supplementarygroups.service b/test/test-execute/exec-dynamicuser-supplementarygroups.service
new file mode 100644
index 0000000000..a47b7fab78
--- /dev/null
+++ b/test/test-execute/exec-dynamicuser-supplementarygroups.service
@@ -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