Systemd/src/shared
Lennart Poettering fafff8f1ff user-util: rework get_user_creds()
Let's fold get_user_creds_clean() into get_user_creds(), and introduce a
flags argument for it to select "clean" behaviour. This flags parameter
also learns to other new flags:

- USER_CREDS_SYNTHESIZE_FALLBACK: in this mode the user records for
  root/nobody are only synthesized as fallback. Normally, the synthesized
  records take precedence over what is in the user database.  With this
  flag set this is reversed, and the user database takes precedence, and
  the synthesized records are only used if they are missing there. This
  flag should be set in cases where doing NSS is deemed safe, and where
  there's interest in knowing the correct shell, for example if the
  admin changed root's shell to zsh or suchlike.

- USER_CREDS_ALLOW_MISSING: if set, and a UID/GID is specified by
  numeric value, and there's no user/group record for it accept it
  anyway. This allows us to fix #9767

This then also ports all users to set the most appropriate flags.

Fixes: #9767

[zj: remove one isempty() call]
2018-08-20 15:58:21 +02:00
..
linux tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
linux-3.13 Avoid strict DM interface version dependencies (#5519) 2017-03-02 19:11:37 +01:00
acl-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
acl-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
acpi-fpdt.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
acpi-fpdt.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
apparmor-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
apparmor-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ask-password-api.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ask-password-api.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
base-filesystem.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
base-filesystem.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
boot-timestamps.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
boot-timestamps.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
bootspec.c Fix SPDX license tags 2018-06-14 13:05:41 +02:00
bootspec.h Fix SPDX license tags 2018-06-14 13:05:41 +02:00
bus-unit-util.c Merge pull request #9504 from poettering/nss-deadlock 2018-07-26 10:16:25 +02:00
bus-unit-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
bus-util.c bus-util: update comment 2018-06-29 12:35:49 +09:00
bus-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgroup-show.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgroup-show.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
clean-ipc.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
clean-ipc.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
condition.c user-util: rework get_user_creds() 2018-08-20 15:58:21 +02:00
condition.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
conf-parser.c conf-parser,login: logs description of error in parsing size 2018-07-03 15:18:04 +02:00
conf-parser.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dev-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dev-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dissect-image.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dissect-image.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dns-domain.c tree-wide: drop empty comments 2018-06-29 11:00:30 +09:00
dns-domain.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
dropin.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
dropin.h Drop my copyright headers 2018-06-14 13:03:20 +02:00
efivars.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
efivars.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fdset.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fdset.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
firewall-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
firewall-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fstab-util.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
fstab-util.h Drop my copyright headers 2018-06-14 13:03:20 +02:00
generator.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
generator.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
gpt.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ima-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ima-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
import-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
import-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
initreq.h tree-wide: drop empty lines in comments 2018-07-23 08:44:24 +02:00
install-printf.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
install-printf.h Drop my copyright headers 2018-06-14 13:03:20 +02:00
install.c install: fix error handling in is_symlink_with_known_name() 2018-06-25 14:07:16 +09:00
install.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal-util.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
journal-util.h tree-wide: add multiple inclusion guard 2018-06-25 13:04:59 +09:00
libshared.sym tree-wide: tabs suck (#8527) 2018-03-23 15:21:35 +01:00
logs-show.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
logs-show.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
loop-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
loop-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
machine-image.c Correct a number of trivial typos. 2018-06-18 22:44:44 +02:00
machine-image.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
machine-pool.c machine-pool: drop unnecessary condition 2018-06-25 13:49:56 +09:00
machine-pool.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
meson.build meson: drop parens when appending to list 2018-07-31 21:02:01 +09:00
module-util.c shared/module-util: fix preexisting mixup with errno sign 2018-07-19 18:28:21 +02:00
module-util.h udev-builtin-kmod: use the generic module_load() function 2018-07-19 18:28:21 +02:00
nsflags.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nsflags.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
output-mode.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
output-mode.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
path-lookup.c shared/path-lookup: remove unnecessary 'if' to help gcc 2018-06-20 10:57:51 +02:00
path-lookup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ptyfwd.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ptyfwd.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
resolve-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
resolve-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
seccomp-util.c seccomp: add swapcontext into @process for ppc32 2018-07-03 13:35:02 +02:00
seccomp-util.h seccomp: add new system call filter, suitable as default whitelist for system services 2018-06-14 17:44:20 +02:00
sleep-config.c sleep-config: library code should not log beyond LOG_DEBUG 2018-07-26 11:01:29 +02:00
sleep-config.h Drop my copyright headers 2018-06-14 13:03:20 +02:00
spawn-ask-password-agent.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
spawn-ask-password-agent.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
spawn-polkit-agent.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
spawn-polkit-agent.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
specifier.c tree-wide: drop empty lines in comments 2018-07-23 08:44:24 +02:00
specifier.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
switch-root.c tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
switch-root.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
sysctl-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
sysctl-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-tables.h Drop my copyright headers 2018-06-14 13:03:20 +02:00
tests.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
tests.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
tomoyo-util.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
tomoyo-util.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
udev-util.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
udev-util.h Drop my copyright headers 2018-06-14 13:03:20 +02:00
uid-range.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
uid-range.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
utmp-wtmp.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
utmp-wtmp.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
vlan-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
vlan-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
volatile-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
volatile-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
watchdog.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
watchdog.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
wireguard-netlink.h networkd: add support for wireguard interface type 2018-01-09 14:00:49 +01:00