1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
systemd-stable/test/TEST-21-SYSUSERS
Michael Vogt b9ee05c266 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:
```
man6:12::/var/cache/man:/sbin/nologin
```
and in group:
```
disk6:
man12:
```

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.
2018-02-01 13:47:50 +09:00
..
Makefile
test-1.expected-group
test-1.expected-passwd
test-1.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-2.expected-group sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-2.expected-passwd sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-2.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-3.expected-group sysusers: ensure GID in uid:gid syntax exists 2018-01-25 17:43:08 +01:00
test-3.expected-passwd sysusers: ensure GID in uid:gid syntax exists 2018-01-25 17:43:08 +01:00
test-3.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-4.expected-group sysusers: make ADD_GROUP always create a group 2018-01-25 12:51:06 +01:00
test-4.expected-passwd sysusers: make ADD_GROUP always create a group 2018-01-25 12:51:06 +01:00
test-4.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-5.expected-group sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-5.expected-passwd sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-5.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-6.expected-group sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-6.expected-passwd sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test-6.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
test.sh sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
unhappy-1.expected-err sysusers: ensure GID in uid:gid syntax exists 2018-01-25 17:43:08 +01:00
unhappy-1.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00
unhappy-2.expected-err sysusers: ensure GID in uid:gid syntax exists 2018-01-25 17:43:08 +01:00
unhappy-2.input sysusers: allow force reusing existing user/group IDs (#8037) 2018-02-01 13:47:50 +09:00