aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@gmail.com>2018-02-01 05:47:50 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-02-01 13:47:50 +0900
commitb9ee05c26617573e3d3c600bf755527e1852859c (patch)
tree231edaf435588efbdade2c53fb749148af8bffc6 /test/TEST-21-SYSUSERS/test-3.input
parenttest-lldp: use `memcmp` to compare bytes (#8054) (diff)
downloadsystemd-b9ee05c26617573e3d3c600bf755527e1852859c.tar.gz
systemd-b9ee05c26617573e3d3c600bf755527e1852859c.tar.bz2
systemd-b9ee05c26617573e3d3c600bf755527e1852859c.zip
sysusers: allow force reusing existing user/group IDs (#8037)
On Debian/Ubuntu systems the default passwd/group files use a slightly strange mapping. E.g. in passwd: ``` man:x:6:12::/var/cache/man:/sbin/nologin ``` and in group: ``` disk:x:6: man:x:12: ``` This is not supported in systemd-sysusers right now because sysusers will not re-use an existing uid/gid in its normal mode of operation. Unfortunately this reuse is needed to replicate the default Debian/Ubuntu users/groups. This commit enforces reuse when the "uid:gid" syntax is used to fix this. I also added a test that replicates the Debian base-passwd passwd/group file to ensure things are ok.
Diffstat (limited to 'test/TEST-21-SYSUSERS/test-3.input')
-rw-r--r--test/TEST-21-SYSUSERS/test-3.input3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/TEST-21-SYSUSERS/test-3.input b/test/TEST-21-SYSUSERS/test-3.input
index b4f86a69f..3257082ce 100644
--- a/test/TEST-21-SYSUSERS/test-3.input
+++ b/test/TEST-21-SYSUSERS/test-3.input
@@ -1,3 +1,6 @@
+# Ensure that the semantic for the uid:gid syntax is correct
+#
+#Type Name ID GECOS HOMEDIR
g hoge 300 - -
u foo 301 - -