From 4de2b47bdec8bbb7df78678a152f18281b20e7b5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 23 Feb 2023 18:03:50 +0900 Subject: [PATCH] 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. --- src/core/dbus-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index d0d92507d6a..48e6419130f 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); -- 2.47.3