buildroot/support
Norbert Lange 41ea61d59c support/scripts/mkusers: allow option for system uid/gid
Some software decides based on uid/gid whether a user is a system or
normal (human) user, with different behaviour for those flavors (example
journald [2]).

So adding logic to create system-users is necessary, we take the now
common ranges from [1].

This extends the mkusers script to allow -2 for uid/gid, this argument
will take an identifier from the user range. All identifiers used up to
now should have been from the system range, so -1 is now interpreted as
a system user/group.

Note that after this commit, all the UIDs and GIDs that are created
automatically (with -1) will change. That means if there is peristent
data on an existing system that was created by such an automatic user,
it will suddenly belong to a different user. However, this could already
happen before: if a USERS line is added to a package, then other UIDs
may change as well.

Add system/user ranges as variables, and the argument for user/system
uid variable as well. Thus some magic constants could be removed, some
further occurences of -1 were replaced with equivalent logic. For
consistency, the existing MIN/MAX_UID/GID variables are renamed to
FIRST/LAST_USER_UID/GID.

Update the documentation with the new automatic ranges.

[1] - https://systemd.io/UIDS-GIDS/
[2] - https://www.freedesktop.org/software/systemd/man/journald.conf.html

Signed-off-by: Norbert Lange <nolange79@gmail.com>
[Arnout: use -1 for system users; refactor the changes a bit]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-05 23:09:31 +01:00
..
config-fragments support/config-fragments/autobuild: fix bootlin-riscv64 configs 2022-01-04 18:08:57 +01:00
dependencies support/dependencies: avoid spurious warning on print-vars 2021-12-04 20:09:04 +01:00
docker support/docker: Add openssh-server 2022-01-06 09:34:05 +01:00
download support/download: drop support for the 'none' hash 2022-01-11 21:58:01 +01:00
gnuconfig support/gnuconfig: fix previous version bump 2020-09-27 18:30:05 +02:00
kconfig support/kconfig: fix compiler warnings 2021-10-06 21:11:09 +02:00
legal-info core/legal-info: update list of saved material in README 2020-01-18 18:38:42 +01:00
libtool
misc package/pkg-meson: improve generation of cross-compilation file 2022-01-31 23:36:11 +01:00
scripts support/scripts/mkusers: allow option for system uid/gid 2022-02-05 23:09:31 +01:00
testing support/testing: add test for python-gnupg 2022-01-26 18:01:08 +01:00