diff options
author | Michael Vogt <michael.vogt@gmail.com> | 2018-02-01 05:47:50 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-02-01 05:47:50 +0100 |
commit | b9ee05c26617573e3d3c600bf755527e1852859c (patch) | |
tree | 231edaf435588efbdade2c53fb749148af8bffc6 /test/TEST-21-SYSUSERS/unhappy-2.input | |
parent | test-lldp: use `memcmp` to compare bytes (#8054) (diff) | |
download | systemd-b9ee05c26617573e3d3c600bf755527e1852859c.tar.xz 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/unhappy-2.input')
-rw-r--r-- | test/TEST-21-SYSUSERS/unhappy-2.input | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/TEST-21-SYSUSERS/unhappy-2.input b/test/TEST-21-SYSUSERS/unhappy-2.input index 521c741cb5..5be0e6d187 100644 --- a/test/TEST-21-SYSUSERS/unhappy-2.input +++ b/test/TEST-21-SYSUSERS/unhappy-2.input @@ -1,2 +1,4 @@ -# it is not allowed to create groups implicitely in the uid:gid syntax -u u1 100:100 -
\ No newline at end of file +# Ensure it is not allowed to create groups implicitely in the uid:gid syntax +# +#Type Name ID GECOS HOMEDIR +u u1 100:100 - |