summaryrefslogtreecommitdiff
path: root/src/basic/user-util.h
Commit message (Collapse)AuthorAge
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* user-util: add new wrappers for reading/writing {passwd,shadow,gshadow} ↵Franck Bui2018-08-24
| | | | | | | | | database files (#8521) The API povided by the glibc is too error-prone as one has to deal directly with errno in order to detect if errors occured. Suggested by Zbigniew.
* sysusers: allow the shell to be specifiedZbigniew Jędrzejewski-Szmek2018-05-30
| | | | | This is necessary for some system users where the "login shell" is set to a specific binary.
* sysusers: emit a bit more info at debug level when locking failsZbigniew Jędrzejewski-Szmek2018-05-30
| | | | | | This is the first error message when running unprivileged, and the message is unspecific, so let's at least add some logging at debug level to make this less confusing.
* nss-systemd,user-util: add a way how synthesizing "nobody" can be turned offLennart Poettering2018-05-30
| | | | | | | | | | | This is quite ugly, but provides us with an avenue for moving distributions to define the "nobody" user properly without breaking legacy systems that us the name for other stuff. The idea is basically, that the distribution adopts the new definition of "nobody" (and thus recompiles systemd with it) and then touches /etc/systemd/dont-synthesize-nobody on legacy systems to turn off possibly conflicting synthesizing of the nobody name by systemd.
* Prep v236 : Add missing SPDX-License-Identifier (2/9) src/basicSven Eden2018-03-26
|
* Prep v236: Update build system and adapt to eloginds needs.Sven Eden2018-03-13
|
* user-util: add UID_NOBODY defines that resolve to (uid_t) 65534Lennart Poettering2017-12-04
| | | | | We use it all over the place, let's add a #define for it. Makes things easier greppable, and more explanatory I think.
* nss-elogind: tweak checks when we consult PID 1 for dynamic UID/GID lookupsLennart Poettering2017-12-02
| | | | | | Instead of contacting PID 1 for dynamic UID/GID lookups for all UIDs/GIDs that do not qualify as "system" do the more precise check instead: check if they actually qualify for the "dynamic" range.
* user-util: add new uid_is_system() helperLennart Poettering2017-12-02
| | | | | | | This adds uid_is_system() and gid_is_system(), similar in style to uid_is_dynamic(). That a helper like this is useful is illustrated by the fact that test-condition.c didn't get the check right so far, which this patch fixes.
* build-sys: make the dynamic UID range, and the container UID range configurableLennart Poettering2017-12-02
| | | | Also, export these ranges in our pkg-config files.
* Prep v232.2: Mask more unneeded functionsSven Eden2017-07-07
|
* core: do not fail in a container if we can't use setgroupsGiuseppe Scrivano2017-07-05
| | | | It might be blocked through /proc/PID/setgroups
* execute: move suppression of HOME=/ and SHELL=/bin/nologin into user-util.cLennart Poettering2017-07-05
| | | | | | | This adds a new call get_user_creds_clean(), which is just like get_user_creds() but returns NULL in the home/shell parameters if they contain no useful information. This code previously lived in execute.c, but by generalizing this we can reuse it in run.c.
* journald: do not create split journals for dynamic usersZbigniew Jędrzejewski-Szmek2017-07-05
| | | | | Dynamic users should be treated like system users, and their logs should end up in the main system journal.
* sysusers: move various user credential validity checks to src/basic/Lennart Poettering2017-07-05
| | | | | | | This way we can reuse them for validating User=/Group= settings in unit files (to be added in a later commit). Also, add some tests for them.
* Prep v230: Add utmp support to make wall message to work properly.Sven Eden2017-06-16
|
* nspawn: make -U a tiny bit smarterLennart Poettering2017-06-16
| | | | | With this change -U will turn on user namespacing only if the kernel actually supports it and otherwise gracefully degrade to non-userns mode.
* Prep v229: Add missing fixes from upstream [1/6] src/basicSven Eden2017-05-17
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2017-05-17
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* Prep v228: Condense elogind source masks (3/5)Sven Eden2017-04-26
|
* Prep v228: Substitute declaration masks (3/4)Sven Eden2017-04-26
|
* Prep v228: Clean up the new src/basic/*-util-[hc] files:Sven Eden2017-04-26
| | | | | | | | | | | | | - src/basic/capability-util.[hc] - src/basic/cgroup-util.[hc] - src/basic/fd-util.[hc] - src/basic/fs-util.[hc] - src/basic/memfd-util.[hc] - src/basic/path-util.[hc] - src/basic/socket-util.[hc] - src/basic/terminal-util.[hc] - src/basic/user-util.[hc] - src/basic/xattr-util.[hc]
* Prep v228: Add remaining updates from upstream (1/3)Sven Eden2017-04-26
The util.[hc] files have been stripped of a lot of functions, that got sorted into various new files representing the type of utility. This commit adds the missing files.