Systemd/src/home
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
..
home-util.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
home-util.h
homectl.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
homed-bus.c
homed-bus.h
homed-home-bus.c home: fix several typos 2020-03-31 15:16:36 +02:00
homed-home-bus.h
homed-home.c Merge pull request #15278 from vcaputo/more-trivial-cleanups 2020-04-01 00:16:56 +02:00
homed-home.h tree-wide: s/home/home area/g 2020-02-26 11:11:57 +01:00
homed-manager-bus.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
homed-manager-bus.h
homed-manager.c home: fix several typos 2020-03-31 15:16:36 +02:00
homed-manager.h
homed-operation.c home: fix several typos 2020-03-31 15:16:36 +02:00
homed-operation.h
homed-varlink.c
homed-varlink.h
homed.c
homework-cifs.c *: use _cleanup_close_ with fdopendir() where trivial 2020-03-31 06:48:03 -07:00
homework-cifs.h
homework-directory.c
homework-directory.h
homework-fscrypt.c
homework-fscrypt.h
homework-luks.c homed: fall back to ftruncate() if fallocate() is not supported on backing fs 2020-04-01 18:19:07 +02:00
homework-luks.h
homework-mount.c
homework-mount.h
homework-pkcs11.c home: fix several typos 2020-03-31 15:16:36 +02:00
homework-pkcs11.h
homework-quota.c
homework-quota.h
homework.c Merge pull request #15278 from vcaputo/more-trivial-cleanups 2020-04-01 00:16:56 +02:00
homework.h
meson.build home: add pam_systemd_home.so PAM hookup 2020-01-28 22:36:41 +01:00
org.freedesktop.home1.conf
org.freedesktop.home1.policy homed: fix typo 2020-02-29 16:06:45 +01:00
org.freedesktop.home1.service
pam_systemd_home.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
pam_systemd_home.sym home: add pam_systemd_home.so PAM hookup 2020-01-28 22:36:41 +01:00
pwquality-util.c home: fix several typos 2020-03-31 15:16:36 +02:00
pwquality-util.h
user-record-sign.c
user-record-sign.h
user-record-util.c user-record-util: add missing error check 2020-01-31 23:08:59 +09:00
user-record-util.h