From: Timo Sirainen Date: Mon, 9 Sep 2019 14:57:14 +0000 (+0300) Subject: lib-http: test-http-client should use PKG_RUNDIR/dns-client X-Git-Tag: 2.3.9~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23b670644045e906d335764219ef3b7b9a6eaf23;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-client should use PKG_RUNDIR/dns-client Instead of hardcoded /var/run/dovecot/dns-client --- diff --git a/src/lib-http/Makefile.am b/src/lib-http/Makefile.am index 92e0437fdf..6959106075 100644 --- a/src/lib-http/Makefile.am +++ b/src/lib-http/Makefile.am @@ -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 \ diff --git a/src/lib-http/test-http-client.c b/src/lib-http/test-http-client.c index f575573366..ecde11ef74 100644 --- a/src/lib-http/test-http-client.c +++ b/src/lib-http/test-http-client.c @@ -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)