summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-02-23 10:03:50 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-02-23 13:34:16 +0100
commit4de2b47bdec8bbb7df78678a152f18281b20e7b5 (patch)
tree9e90c61d7a67045982ff8f710395219a0b353fe2
parentexecute: pass ambient caps from PAM through to invoked service (diff)
downloadsystemd-4de2b47bdec8bbb7df78678a152f18281b20e7b5.tar.xz
systemd-4de2b47bdec8bbb7df78678a152f18281b20e7b5.zip
core/dbus-socket: check the socket path is absolute
In config_parse_socket_listen(), we have checked the path is absolute, however we have not in the dbus method.
-rw-r--r--src/core/dbus-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c
index d0d92507d6..48e6419130 100644
--- a/src/core/dbus-socket.c
+++ b/src/core/dbus-socket.c
@@ -380,7 +380,7 @@ static int bus_socket_set_transient_property(
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown Socket type: %s", t);
if (p->type != SOCKET_SOCKET) {
- if (!path_is_valid(a))
+ if (!path_is_absolute(a) || !path_is_valid(a))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid socket path: %s", a);
p->path = strdup(a);