diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-07-12 16:53:59 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-07-12 16:53:59 +0000 |
commit | 207845f50a8fb54fe8e584928078dc3687399caf (patch) | |
tree | f58eac67edc2dbaba13a48442a2093f76e869991 /src/clients/s6-dnsqualify.c | |
parent | 8cf671e973a4ea2ef7c9ca1321531a7ceeaa5073 (diff) | |
download | s6-dns-207845f50a8fb54fe8e584928078dc3687399caf.tar.xz |
Pass on all clients, add hosts support wherever applicable
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/clients/s6-dnsqualify.c')
-rw-r--r-- | src/clients/s6-dnsqualify.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clients/s6-dnsqualify.c b/src/clients/s6-dnsqualify.c index 38bf3ea..1752389 100644 --- a/src/clients/s6-dnsqualify.c +++ b/src/clients/s6-dnsqualify.c @@ -2,8 +2,10 @@ #include <sys/types.h> #include <string.h> + #include <skalibs/strerr.h> #include <skalibs/buffer.h> + #include <s6-dns/s6dns.h> #define USAGE "s6-dnsqualify name" @@ -16,7 +18,10 @@ int main (int argc, char const *const *argv) if (argc < 2) dieusage() ; if (!s6dns_domain_fromstring(&d, argv[1], strlen(argv[1]))) strerr_diefu2sys(100, "make a domain name from ", argv[1]) ; - if (!s6dns_init()) strerr_diefu1sys(111, "s6dns_init") ; + + if (!s6dns_rci_init(&s6dns_rci_here, "/etc/resolv.conf")) + strerr_diefu1sys(111, "initialize structures from /etc/resolv.conf") ; + { s6dns_domain_t list[s6dns_rci_here.rulesnum] ; unsigned int n = s6dns_qualify(list, &d) ; |