summaryrefslogtreecommitdiffstats
path: root/src/busctl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:54:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:54:54 +0000
commitaf2a7ac568af7b8ecf1002023dd9d07135c3c9c2 (patch)
tree581ab49f856374f88fabfc43ba54969edbe67316 /src/busctl
parentReleasing progress-linux version 255.4-1~progress7.99u1. (diff)
downloadsystemd-af2a7ac568af7b8ecf1002023dd9d07135c3c9c2.tar.xz
systemd-af2a7ac568af7b8ecf1002023dd9d07135c3c9c2.zip
Merging upstream version 255.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/busctl')
-rw-r--r--src/busctl/busctl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c
index 39d22f2..01cb896 100644
--- a/src/busctl/busctl.c
+++ b/src/busctl/busctl.c
@@ -2021,6 +2021,15 @@ static int call(int argc, char **argv, void *userdata) {
if (r < 0)
return r;
+ if (!service_name_is_valid(argv[1]))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid service name: %s", argv[1]);
+ if (!object_path_is_valid(argv[2]))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid object path: %s", argv[2]);
+ if (!interface_name_is_valid(argv[3]))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid interface name: %s", argv[3]);
+ if (!member_name_is_valid(argv[4]))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid member name: %s", argv[4]);
+
r = sd_bus_message_new_method_call(bus, &m, argv[1], argv[2], argv[3], argv[4]);
if (r < 0)
return bus_log_create_error(r);