projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
638fd8c
)
core/dbus-socket: check the socket path is absolute
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 09:03:50 +0000
(18:03 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 12:34:16 +0000
(21:34 +0900)
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
patch
|
blob
|
history
diff --git
a/src/core/dbus-socket.c
b/src/core/dbus-socket.c
index d0d92507d6ab47baee6c5395e7b652f3e4c61783..48e6419130f836a0fdb87e95c40e9c5d5e573b91 100644
(file)
--- 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);