mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-01 05:47:04 +03:00
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. (cherry picked from commit 4de2b47bdec8bbb7df78678a152f18281b20e7b5)
This commit is contained in:
parent
a719c2ec2f
commit
e093acd062
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user