1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00

resolve: refuse invalid service without type field

Fixes Fixes #33935.

(cherry picked from commit b48ab08732a76b7337628e1e716f11c687000903)
(cherry picked from commit 0195db6e919e80bdd6b4b706ebc24d5e935f5422)
(cherry picked from commit 7b1bb6e0bc)
(cherry picked from commit bafd8fcb36)
This commit is contained in:
Yu Watanabe 2024-08-05 10:46:41 +09:00 committed by Luca Boccassi
parent d62a0aaf0c
commit 643780a559

View File

@ -1133,6 +1133,11 @@ static void resolve_service_all_complete(DnsQuery *query) {
if (r < 0)
goto finish;
if (isempty(type)) {
r = reply_method_errorf(q, BUS_ERROR_NO_SUCH_SERVICE, "'%s' does not provide valid service", dns_query_string(q));
goto finish;
}
r = sd_bus_message_append(
reply,
"ssst",