]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-client should use PKG_RUNDIR/dns-client
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 9 Sep 2019 14:57:14 +0000 (17:57 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 9 Sep 2019 14:57:14 +0000 (17:57 +0300)
Instead of hardcoded /var/run/dovecot/dns-client

src/lib-http/Makefile.am
src/lib-http/test-http-client.c

index 92e0437fdffeccbe81566b45662f732672c88245..6959106075f09b5cc8ac44a3ba138be0b7872da3 100644 (file)
@@ -5,7 +5,8 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/lib-test \
        -I$(top_srcdir)/src/lib-dns \
        -I$(top_srcdir)/src/lib-ssl-iostream \
-       -I$(top_srcdir)/src/lib-master
+       -I$(top_srcdir)/src/lib-master \
+       -DPKG_RUNDIR=\""$(rundir)"\"
 
 libhttp_la_SOURCES = \
        http-date.c \
index f575573366ea74b5cf6012e48b1d214d5e6adef1..ecde11ef74dcafba05f78e9c858fd4770ee0fe4c 100644 (file)
@@ -371,12 +371,12 @@ int main(int argc, char *argv[])
           safe-memset.lo directly causes them to fail.) If safe_memset() isn't
           included, libssl-iostream plugin loading fails. */
        i_zero_safe(&dns_set);
-       dns_set.dns_client_socket_path = "/var/run/dovecot/dns-client";
+       dns_set.dns_client_socket_path = PKG_RUNDIR"/dns-client";
        dns_set.timeout_msecs = 30*1000;
        dns_set.idle_timeout_msecs = UINT_MAX;
 
        /* check if there is a DNS client */
-       if (access("/var/run/dovecot/dns-client", R_OK|W_OK) == 0) {
+       if (access(dns_set.dns_client_socket_path, R_OK|W_OK) == 0) {
                dns_client = dns_client_init(&dns_set);
 
                if (dns_client_connect(dns_client, &error) < 0)