From: Yu Watanabe Date: Thu, 23 Feb 2023 09:03:50 +0000 (+0900) Subject: core/dbus-socket: check the socket path is absolute X-Git-Tag: v254-rc1~1175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4de2b47bdec8bbb7df78678a152f18281b20e7b5;p=thirdparty%2Fsystemd.git 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. --- 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);