mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-26 08:55:18 +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 commit4de2b47bde
) (cherry picked from commite093acd062
) (cherry picked from commit22d1f01b05
) (cherry picked from commit1a4634b6f4
)
This commit is contained in:
parent
056fbe84ef
commit
0d386bb7d6
@ -383,7 +383,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…
Reference in New Issue
Block a user