summaryrefslogtreecommitdiffstats
path: root/src/shared/userdb.c
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-02-22 19:30:48 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-02-27 08:47:52 +0100
commit19bb96759a915c4801e71b58f064f0e58a89d788 (patch)
tree7afba8d955c4e3d7bb2ccb759d23426a11487c95 /src/shared/userdb.c
parenthwdb: Fix rotation for Nuvision Encite Split 11 (diff)
downloadsystemd-19bb96759a915c4801e71b58f064f0e58a89d788.tar.xz
systemd-19bb96759a915c4801e71b58f064f0e58a89d788.zip
userdb: allow dots in username
This prevents an error in pam_systemd when logging in. sshd[2623165]: pam_unix(sshd:session): session opened for user tony.stark(uid=10001) by (uid=0) sshd[2623165]: pam_systemd(sshd:session): Failed to get user record: Invalid argument Bug: https://bugs.gentoo.org/708824
Diffstat (limited to '')
-rw-r--r--src/shared/userdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/userdb.c b/src/shared/userdb.c
index 1f05cda26a..aa46874ed3 100644
--- a/src/shared/userdb.c
+++ b/src/shared/userdb.c
@@ -587,7 +587,7 @@ int userdb_by_name(const char *name, UserDBFlags flags, UserRecord **ret) {
_cleanup_(json_variant_unrefp) JsonVariant *query = NULL;
int r;
- if (!valid_user_group_name(name))
+ if (!valid_user_group_name_compat(name))
return -EINVAL;
r = json_build(&query, JSON_BUILD_OBJECT(
@@ -797,7 +797,7 @@ int groupdb_by_name(const char *name, UserDBFlags flags, GroupRecord **ret) {
_cleanup_(json_variant_unrefp) JsonVariant *query = NULL;
int r;
- if (!valid_user_group_name(name))
+ if (!valid_user_group_name_compat(name))
return -EINVAL;
r = json_build(&query, JSON_BUILD_OBJECT(
@@ -990,7 +990,7 @@ int membershipdb_by_user(const char *name, UserDBFlags flags, UserDBIterator **r
assert(ret);
- if (!valid_user_group_name(name))
+ if (!valid_user_group_name_compat(name))
return -EINVAL;
r = json_build(&query, JSON_BUILD_OBJECT(
@@ -1033,7 +1033,7 @@ int membershipdb_by_group(const char *name, UserDBFlags flags, UserDBIterator **
assert(ret);
- if (!valid_user_group_name(name))
+ if (!valid_user_group_name_compat(name))
return -EINVAL;
r = json_build(&query, JSON_BUILD_OBJECT(