Systemd/src
Lennart Poettering 7a8867abfa user-util: rework how we validate user names
This reworks the user validation infrastructure. There are now two
modes. In regular mode we are strict and test against a strict set of
valid chars. And in "relaxed" mode we just filter out some really
obvious, dangerous stuff. i.e. strict is whitelisting what is OK, but
"relaxed" is blacklisting what is really not OK.

The idea is that we use strict mode whenver we allocate a new user
(i.e. in sysusers.d or homed), while "relaxed" mode is when we process
users registered elsewhere, (i.e. userdb, logind, …)

The requirements on user name validity vary wildly. SSSD thinks its fine
to embedd "@" for example, while the suggested NAME_REGEX field on
Debian does not even allow uppercase chars…

This effectively liberaralizes a lot what we expect from usernames.

The code that warns about questionnable user names is now optional and
only used at places such as unit file parsing, so that it doesn't show
up on every userdb query, but only when processing configuration files
that know better.

Fixes: #15149 #15090
2020-04-08 17:11:20 +02:00
..
ac-power
activate util-lib: move things that parse ifnames to shared/ 2020-01-11 12:07:28 +01:00
analyze analyze: fix table time output 2020-03-09 14:58:25 +01:00
ask-password
backlight
basic user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
binfmt
boot *: use _cleanup_close_ with fdopen() where trivial 2020-03-31 06:48:03 -07:00
busctl Remove message->priority field 2020-04-07 15:29:23 +02:00
cgls
cgroups-agent
cgtop
core user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
coredump *: use _cleanup_close_ with fdopen() where trivial 2020-03-31 06:48:03 -07:00
cryptsetup units: introduce blockdev@.target for properly ordering mounts/swaps against cryptsetup 2020-01-21 20:23:13 +01:00
debug-generator
delta
detect-virt
dissect dissect: add --fsck= option to systemd-dissect tool 2020-01-29 19:29:52 +01:00
environment-d-generator sd-path: rename the two functions 2020-03-27 20:12:44 +01:00
escape
firstboot firstboot: add missing check 2020-02-06 09:52:39 +01:00
fsck
fstab-generator fstab-generator: handle systemd.swap= command-line argument 2020-03-12 17:52:43 +01:00
fuzz ci: turn off FuzzBuzz 2020-03-30 14:57:22 +02:00
getty-generator
gpt-auto-generator units: introduce blockdev@.target for properly ordering mounts/swaps against cryptsetup 2020-01-21 20:23:13 +01:00
hibernate-resume Fix generator name in hibernate-resume-generator's drop-in 2020-02-04 14:49:04 +09:00
home user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
hostname shared: split out polkit stuff from bus-util.c → bus-polkit.c 2020-01-22 12:34:10 +01:00
hwdb
id128 id128: change table header from "uuid" to just "id" 2020-01-29 15:32:26 +01:00
import import: Only keep RO copy if ETag header is set 2020-03-23 21:39:59 -07:00
initctl initctl: (void)ify epoll_ctl() 2020-01-10 10:06:09 +01:00
journal *: use _cleanup_close_ with fdopendir() where trivial 2020-03-31 06:48:03 -07:00
journal-remote Merge pull request #15290 from keszybz/unrelated-fixes 2020-04-03 15:54:38 -07:00
kernel-install treewide: more portable bash shebangs 2020-03-05 17:27:07 +01:00
libsystemd Remove message->priority field 2020-04-07 15:29:23 +02:00
libsystemd-network Merge pull request #15252 from ssahani/dhcpv6-mud 2020-04-02 10:23:15 +02:00
libudev
locale shared: split out polkit stuff from bus-util.c → bus-polkit.c 2020-01-22 12:34:10 +01:00
login login: allow non-console sessions to change vt 2020-03-19 09:29:23 +01:00
machine *: convert amenable fdopen calls to take_fdopen 2020-03-31 06:48:03 -07:00
machine-id-setup
modules-load
mount systemd: Fix busctl crash on aarch64 when setting output table format 2020-02-16 02:09:26 +09:00
network Merge pull request #15210 from ssahani/networkctl-up-down 2020-04-02 11:21:25 +02:00
notify
nspawn *: convert amenable fdopendir() calls to take_fdopendir() 2020-03-31 06:48:03 -07:00
nss-myhostname
nss-mymachines
nss-resolve
nss-systemd user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
partition test: convert TEST-45 to a normal meson test 2020-03-28 11:50:38 +01:00
path path: log at debug level when we can't query a variable 2020-03-27 20:12:45 +01:00
portable *: convert amenable fdopen calls to take_fdopen 2020-03-31 06:48:03 -07:00
pstore
quotacheck
random-seed random-seed: add missing header for GRND_NONBLOCK (#14988) 2020-03-02 14:48:21 +09:00
rc-local-generator
remount-fs
reply-password
resolve Merge pull request #14930 from tomhughes/dnssec-canonicalise 2020-04-07 17:07:04 +02:00
rfkill
run
run-generator
shared user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
shutdown Merge pull request #13084 from ddstreet/log_time 2020-03-30 17:57:34 +02:00
sleep sleep: automatically lock all home directories when suspending 2020-01-28 22:36:56 +01:00
socket-proxy tree-wide: use the return value from sockaddr_un_set_path() 2020-03-02 15:55:44 +01:00
stdio-bridge
sulogin-shell
sysctl sysctl: fix segfault 2020-02-06 23:49:32 +09:00
system-update-generator
systemctl systemctl: add -P as short for --value --property= 2020-04-03 18:24:20 +02:00
systemd user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
sysusers user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
sysv-generator
test user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
time-wait-sync
timedate shared: split out polkit stuff from bus-util.c → bus-polkit.c 2020-01-22 12:34:10 +01:00
timesync tree-wide: fix spelling of lookup and setup verbs 2020-03-03 15:02:53 +01:00
tmpfiles sd-path: rename the two functions 2020-03-27 20:12:44 +01:00
tty-ask-password-agent tree-wide: use the return value from sockaddr_un_set_path() 2020-03-02 15:55:44 +01:00
udev udev: Fix SIGSEGV in AlternativeNamesPolicy handling 2020-04-02 10:18:56 +02:00
update-done
update-utmp
user-sessions
userdb userdbctl: drop redundant user name validity check 2020-04-08 16:48:54 +02:00
vconsole
veritysetup id128: introduce ID128_UUID_STRING_MAX for sizing UUID buffers 2019-12-10 11:56:18 +01:00
version meson: explain GIT_VERSION and PROJECT_VERSION 2020-02-28 16:54:33 +01:00
volatile-root