summaryrefslogtreecommitdiff
path: root/src/core/dbus-socket.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-08-01 09:58:27 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-08-19 21:19:13 +0200
commitae480f0b09aec815b64579bb1828ea935d8ee236 (patch)
tree11e606315ae45e8a9d6718f23a8c10f5048f117a /src/core/dbus-socket.c
parent1a29610f5fa1bcb2eeb37d2c6b79d8d1a6dbb865 (diff)
downloadsystemd-ae480f0b09aec815b64579bb1828ea935d8ee236.tar.gz
shared/user-util: allow usernames with dots in specific fields
People do have usernames with dots, and it makes them very unhappy that systemd doesn't like their that. It seems that there is no actual problem with allowing dots in the username. In particular chown declares ":" as the official separator, and internally in systemd we never rely on "." as the seperator between user and group (nor do we call chown directly). Using dots in the name is probably not a very good idea, but we don't need to care. Debian tools (adduser) do not allow users with dots to be created. This patch allows *existing* names with dots to be used in User, Group, SupplementaryGroups, SocketUser, SocketGroup fields, both in unit files and on the command line. DynamicUsers and sysusers still follow the strict policy. user@.service and tmpfiles already allowed arbitrary user names, and this remains unchanged. Fixes #12754.
Diffstat (limited to 'src/core/dbus-socket.c')
-rw-r--r--src/core/dbus-socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c
index e895c94e12..25d3d71391 100644
--- a/src/core/dbus-socket.c
+++ b/src/core/dbus-socket.c
@@ -277,10 +277,10 @@ static int bus_socket_set_transient_property(
return bus_set_transient_fdname(u, name, &s->fdname, message, flags, error);
if (streq(name, "SocketUser"))
- return bus_set_transient_user(u, name, &s->user, message, flags, error);
+ return bus_set_transient_user_compat(u, name, &s->user, message, flags, error);
if (streq(name, "SocketGroup"))
- return bus_set_transient_user(u, name, &s->group, message, flags, error);
+ return bus_set_transient_user_compat(u, name, &s->group, message, flags, error);
if (streq(name, "BindIPv6Only"))
return bus_set_transient_bind_ipv6_only(u, name, &s->bind_ipv6_only, message, flags, error);