Systemd/src/systemd
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
..
_sd-common.h journal: properly mark two definitions that are deprecated with GCC attributes for that 2020-01-31 15:02:00 +01:00
meson.build libsystemd: install sd-path.h and export sd_path_lookup{,_strv} 2020-03-27 20:12:44 +01:00
sd-bus-protocol.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-bus-vtable.h sd-bus: add new call sd_bus_message_sensitive() and SD_BUS_VTABLE_SENSITIVE 2019-12-04 13:46:23 +01:00
sd-bus.h sd-bus: Deprecate priority functions 2020-04-02 21:36:59 +02:00
sd-daemon.h sd-daemon: don't mention strerror_safe() in examples in public headers 2019-07-23 15:56:41 +02:00
sd-device.h sd-device: drop priority and description from sd_device_monitor_attach_event() and sd_device_monitor_start() 2018-11-10 22:53:00 +09:00
sd-dhcp-client.h sd-dhcpv4: introduce The Manufacturer Usage Description (MUD) 2020-03-30 19:16:01 +02:00
sd-dhcp-lease.h sd-dhcp: Add support to emit and retrieve SMTP server 2020-03-28 11:21:17 +01:00
sd-dhcp-option.h dhcp: remove struct sd_dhcp_raw_option 2019-11-18 23:37:22 +09:00
sd-dhcp-server.h sd-dhcp: Add support to emit and retrieve SMTP server 2020-03-28 11:21:17 +01:00
sd-dhcp6-client.h sd-dhcpv6: Add support to set request MUD URL 2020-04-01 16:59:29 +02:00
sd-dhcp6-lease.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
sd-event.h sd-event: add pidfd support 2019-12-04 10:34:41 +01:00
sd-hwdb.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
sd-id128.h tree-wide: drop duplicated blank lines 2019-07-15 18:41:27 +02:00
sd-ipv4acd.h ipv4ll: do not reset conflict counter on restart 2019-12-11 13:26:31 +09:00
sd-ipv4ll.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
sd-journal.h journal: allow opening journal files specific to some namespace 2020-01-31 15:02:29 +01:00
sd-lldp.h Merge pull request #11241 from bengal/lldp-802-3-subtypes 2019-01-06 18:15:51 +01:00
sd-login.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00
sd-messages.h user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
sd-ndisc.h ndisc: improve debug log message 2018-11-06 20:15:09 +09:00
sd-netlink.h sd-netlink: introduce sd_netlink_message_append_s8() and friends 2020-03-02 15:59:32 +09:00
sd-network.h sd-network: Add support to emit and receive SMTP server information 2020-03-29 22:59:18 +02:00
sd-path.h sd-path: export "systemd-network-path" 2020-03-27 20:12:45 +01:00
sd-radv.h network: radv introduce sd_radv_prefix_get_prefix 2020-03-01 00:16:51 +09:00
sd-resolve.h tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
sd-utf8.h tree-wide: drop empty lines in the begining of comments 2018-06-29 10:50:23 +09:00