]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add a test for sysusers
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 1 Mar 2018 05:52:28 +0000 (14:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 1 Mar 2018 22:12:40 +0000 (07:12 +0900)
The test cases for sysusers did not cover the situation reported in
issue #8315. Let's add one more test case.

test/TEST-21-SYSUSERS/test-7.expected-group [new file with mode: 0644]
test/TEST-21-SYSUSERS/test-7.expected-passwd [new file with mode: 0644]
test/TEST-21-SYSUSERS/test-7.input [new file with mode: 0644]

diff --git a/test/TEST-21-SYSUSERS/test-7.expected-group b/test/TEST-21-SYSUSERS/test-7.expected-group
new file mode 100644 (file)
index 0000000..ae9539c
--- /dev/null
@@ -0,0 +1,16 @@
+sys:x:3:
+mem:x:8:
+ftp:x:11:
+mail:x:12:
+log:x:19:
+smmsp:x:25:
+proc:x:26:
+games:x:50:
+lock:x:54:
+network:x:90:
+floppy:x:94:
+scanner:x:96:
+power:x:98:
+bin:x:1:
+daemon:x:2:
+http:x:33:
diff --git a/test/TEST-21-SYSUSERS/test-7.expected-passwd b/test/TEST-21-SYSUSERS/test-7.expected-passwd
new file mode 100644 (file)
index 0000000..79668c0
--- /dev/null
@@ -0,0 +1,5 @@
+bin:x:1:1::/:/sbin/nologin
+daemon:x:2:2::/:/sbin/nologin
+mail:x:8:12::/var/spool/mail:/sbin/nologin
+ftp:x:14:11::/srv/ftp:/sbin/nologin
+http:x:33:33::/srv/http:/sbin/nologin
diff --git a/test/TEST-21-SYSUSERS/test-7.input b/test/TEST-21-SYSUSERS/test-7.input
new file mode 100644 (file)
index 0000000..4e10b74
--- /dev/null
@@ -0,0 +1,26 @@
+# Issue #8315
+#
+#Type Name ID  GECOS HOMEDIR
+
+# default arch groups
+# groups first, because we have user/group id mismatch on ftp and mail
+g sys 3 - -
+g mem 8 - -
+g ftp 11 - -
+g mail 12 - -
+g log 19 - -
+g smmsp 25 - -
+g proc 26 - -
+g games 50 - -
+g lock 54 - -
+g network 90 - -
+g floppy 94 - -
+g scanner 96 - -
+g power 98 - -
+
+# default arch users
+u bin 1 - -
+u daemon 2 - -
+u mail 8 - /var/spool/mail
+u ftp 14 - /srv/ftp
+u http 33 - /srv/http