]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: allow to specify SD_RESOLVED_NO_SEARCH flag in ResolveRecord
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 12:10:55 +0000 (21:10 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 13:41:10 +0000 (22:41 +0900)
The varlink method io.systemd.Resolve.ResolveRecord already accepts the
flag. Let's also the bus method accept the flag, for consistency.

src/resolve/resolved-bus.c

index 96cfd32257a225586ff85f44f8ef92cc49e396cf..8415444463d95dd3efb57d30d48d61c79a5a83f1 100644 (file)
@@ -796,7 +796,7 @@ static int bus_method_resolve_record(sd_bus_message *message, void *userdata, sd
         if (dns_type_is_obsolete(type))
                 return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "Specified DNS resource record type %" PRIu16 " is obsolete.", type);
 
-        if (validate_and_mangle_query_flags(m, &flags, name, /* ok = */ 0) < 0)
+        if (validate_and_mangle_query_flags(m, &flags, name, SD_RESOLVED_NO_SEARCH) < 0)
                 return sd_bus_error_set(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid flags parameter");
 
         question = dns_question_new(1);