summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2016-11-02 22:59:41 +0100
committerDjalal Harouni <tixxdz@opendz.org>2016-11-03 08:37:15 +0100
commit2b9ac11ed96f2823972a77fc7cb0c32981218429 (patch)
treedd6924bcb4d86f3cd3035d2ceeaf4c75197658e3 /test
parentcdc5d5c55e58ff9eeb6b2258c9fc3a416ee8b53f (diff)
test: test DynamicUser= with a fixed user
Diffstat (limited to 'test')
-rw-r--r--test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service9
-rw-r--r--test/test-execute/exec-dynamicuser-fixeduser.service8
2 files changed, 17 insertions, 0 deletions
diff --git a/test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service b/test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
new file mode 100644
index 0000000000..de1a6e7303
--- /dev/null
+++ b/test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Test DynamicUser with User= and SupplementaryGroups=
+
+[Service]
+ExecStart=/bin/sh -x -c 'test "$$(id -G)" = "1" && test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
+Type=oneshot
+User=1
+DynamicUser=yes
+SupplementaryGroups=1
diff --git a/test/test-execute/exec-dynamicuser-fixeduser.service b/test/test-execute/exec-dynamicuser-fixeduser.service
new file mode 100644
index 0000000000..1d84af02ed
--- /dev/null
+++ b/test/test-execute/exec-dynamicuser-fixeduser.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test DynamicUser with User=
+
+[Service]
+ExecStart=/bin/sh -x -c 'test "$$(id -G)" = "1" && test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
+Type=oneshot
+User=1
+DynamicUser=yes