summaryrefslogtreecommitdiffstats
path: root/src/test/test-user-record.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* user-record: only synthesize default list of self-modifiable fields for ↵Lennart Poettering11 days1-1/+1
| | | | | | | | | | | | *regular* users For system users we should lock things down, hence generate an empty list. This is mostly a safety precaution, but also hides really confusing output of "userdbctl user" for an system user. Follow-up for: a192250eda1e5cc1f8fc799cf9b85d37e7fa0519
* test: Test user record selfModifiable behaviorAdrian Vovk2024-11-011-0/+101
|
* test: rename test-user-record → test-uid-alloc-rangeLennart Poettering2021-11-131-104/+0
| | | | | It doesn't actually test any of the JSON stuff, hence name it test-uid-alloc-range, since it tests the stuff from uid-alloc-range.
* shared: split out UID allocation range stuff from user-record.hLennart Poettering2021-11-131-2/+2
| | | | | | | | user-record.[ch] are about the UserRecord JSON stuff, and the UID allocation range stuff (i.e. login.defs handling) is a very different thing, and complex enough on its own, let's give it its own c/h files. No code changes, just some splitting out of code.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* sysusers: look at login.defs when setting the default range to allocate usersZbigniew Jędrzejewski-Szmek2020-10-011-0/+48
| | | | | | | | | | | | | Also, even if login.defs are not present, don't start allocating at 1, but at SYSTEM_UID_MIN. Fixes #9769. The test is adjusted. Actually, it was busted before, because sysusers would never use SYSTEM_GID_MIN, so if SYSTEM_GID_MIN was different than SYSTEM_UID_MIN, the tests would fail. On all "normal" systems the two are equal, so we didn't notice. Since sysusers now always uses the minimum of the two, we only need to substitute one value.
* Also parse the minimum uid/gid valuesZbigniew Jędrzejewski-Szmek2020-10-011-0/+2
| | | | | | | We don't (and shouldn't I think) look at them when determining the type of the user, but they should be used during user/group allocation. (For example, an admin may specify SYS_UID_MIN==200 to allow statically numbered users that are shared with other systems in the range 1–199.)
* Look at /etc/login.defs for the system_max_[ug]id valuesZbigniew Jędrzejewski-Szmek2020-10-011-0/+54
It makes little sense to make the boundary between systemd and user guids configurable. Nevertheless, a completely fixed compile-time define is not enough in two scenarios: - the systemd_uid_max boundary has moved over time. The default used to be 500 for a long time. Systems which are upgraded over time might have users in the wrong range, but changing existing systems is complicated and expensive (offline disks, backups, remote systems, read-only media, etc.) - systems are used in a heterogenous enviornment, where some vendors pick one value and others another. So let's make this boundary overridable using /etc/login.defs. Fixes #3855, #10184.