X-Git-Url: https://unix4lyfe.org/gitweb/darkstat-debian/blobdiff_plain/3c6b3682c70be84db86e70c191016913a9836c31..HEAD:/dns.c diff --git a/dns.c b/dns.c index 5b6d95b..163aa56 100644 --- a/dns.c +++ b/dns.c @@ -8,6 +8,7 @@ */ #include "cdefs.h" +#include "cap.h" #include "conv.h" #include "decode.h" #include "dns.h" @@ -65,8 +66,9 @@ dns_init(const char *privdrop_user) daemonize_finish(); /* drop our copy of the lifeline! */ if (signal(SIGUSR1, SIG_IGN) == SIG_ERR) errx(1, "signal(SIGUSR1, ignore) failed"); + cap_free_args(); dns_main(); - exit(0); + errx(1, "DNS child fell out of dns_main()"); } else { /* We are the parent. */ close(dns_sock[CHILD]); @@ -375,7 +377,7 @@ dns_main(void) host, sizeof(host), NULL, 0, flags); break; default: - ret = EAI_FAMILY; + errx(1, "unexpected ip.family = %d", ip.family); } if (ret != 0) {