From f491ac4fab469421986f77df0bbf79fefc417786 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 13 Jan 2012 17:04:35 +0000 Subject: [PATCH] change default configurations on systems with UNIX domain sockets to NOT specify any port for TCP-based IPC (and interpret that as no TCP-based IPC desired), as we can and want to use UNIX domain sockets in this case by default --- configure.ac | 32 ++++++++++++- src/arm/Makefile.am | 2 +- src/arm/{arm.conf => arm.conf.in} | 2 +- src/ats/Makefile.am | 2 +- src/ats/{ats.conf => ats.conf.in} | 2 +- src/chat/Makefile.am | 2 +- src/chat/{chat.conf => chat.conf.in} | 2 +- src/core/Makefile.am | 2 +- src/core/{core.conf => core.conf.in} | 2 +- src/datastore/Makefile.am | 2 +- .../{datastore.conf => datastore.conf.in} | 2 +- src/dht/Makefile.am | 2 +- src/dht/{dht.conf => dht.conf.in} | 2 +- src/dns/Makefile.am | 2 +- src/dns/{dns.conf => dns.conf.in} | 2 +- src/dv/Makefile.am | 2 +- src/dv/{dv.conf => dv.conf.in} | 3 +- src/fs/Makefile.am | 2 +- src/fs/{fs.conf => fs.conf.in} | 2 +- src/mesh/Makefile.am | 2 +- src/mesh/{mesh.conf => mesh.conf.in} | 2 +- src/nse/Makefile.am | 2 +- src/nse/{nse.conf => nse.conf.in} | 4 +- src/peerinfo/Makefile.am | 2 +- .../{peerinfo.conf => peerinfo.conf.in} | 2 +- src/statistics/Makefile.am | 2 +- .../{statistics.conf => statistics.conf.in} | 2 +- src/transport/Makefile.am | 2 +- .../{transport.conf => transport.conf.in} | 2 +- src/util/Makefile.am | 5 +- src/util/client.c | 46 +++++++++++-------- src/util/{resolver.conf => resolver.conf.in} | 2 +- src/vpn/Makefile.am | 2 +- src/vpn/{vpn.conf => vpn.conf.in} | 2 +- 34 files changed, 96 insertions(+), 52 deletions(-) rename src/arm/{arm.conf => arm.conf.in} (94%) rename src/ats/{ats.conf => ats.conf.in} (95%) rename src/chat/{chat.conf => chat.conf.in} (94%) rename src/core/{core.conf => core.conf.in} (94%) rename src/datastore/{datastore.conf => datastore.conf.in} (96%) rename src/dht/{dht.conf => dht.conf.in} (96%) rename src/dns/{dns.conf => dns.conf.in} (95%) rename src/dv/{dv.conf => dv.conf.in} (79%) rename src/fs/{fs.conf => fs.conf.in} (97%) rename src/mesh/{mesh.conf => mesh.conf.in} (91%) rename src/nse/{nse.conf => nse.conf.in} (93%) rename src/peerinfo/{peerinfo.conf => peerinfo.conf.in} (94%) rename src/statistics/{statistics.conf => statistics.conf.in} (94%) rename src/transport/{transport.conf => transport.conf.in} (98%) rename src/util/{resolver.conf => resolver.conf.in} (94%) rename src/vpn/{vpn.conf => vpn.conf.in} (94%) diff --git a/configure.ac b/configure.ac index 9ab15c647..9dd33ef8f 100644 --- a/configure.ac +++ b/configure.ac @@ -79,12 +79,14 @@ case "$host_os" in DEFAULT_INTERFACE="\"en0\"" LIBPREFIX= DLLDIR=lib + UNIXONLY="#" ;; linux*) AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) build_target="linux" LIBPREFIX= DLLDIR=lib + UNIXONLY="#" AC_PATH_XTRA ;; freebsd*) @@ -94,6 +96,7 @@ freebsd*) build_target="freebsd" LIBPREFIX= DLLDIR=lib + UNIXONLY="#" ;; openbsd*) AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) @@ -102,12 +105,14 @@ openbsd*) build_target="openbsd" LIBPREFIX= DLLDIR=lib + UNIXONLY="#" ;; netbsd*) AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system]) LIBPREFIX= DLLDIR=lib + UNIXONLY="#" ;; *solaris*) AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system]) @@ -117,6 +122,7 @@ netbsd*) build_target="solaris" LIBPREFIX= DLLDIR=lib + UNIXONLY="#" ;; *arm-linux*) AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) @@ -124,6 +130,7 @@ netbsd*) build_target="linux" LIBPREFIX= DLLDIR=lib + UNIXONLY="#" ;; *cygwin*) AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system]) @@ -135,6 +142,7 @@ netbsd*) LIBPREFIX=lib DLLDIR=bin AC_PROG_CXX + UNIXONLY="" ;; *mingw*) AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) @@ -149,15 +157,21 @@ netbsd*) AC_PROG_CXX LIBPREFIX=lib DLLDIR=bin + UNIXONLY="" ;; *) AC_MSG_RESULT(Unrecognised OS $host_os) AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS]) + UNIXONLY="" ;; esac AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface]) AC_SUBST(DEFAULT_INTERFACE) +# Disable TCP-based IPC on systems that support UNIX domain +# sockets in default configuratin: +AC_SUBST(UNIXONLY) + AC_MSG_CHECKING([for build target]) AM_CONDITIONAL(DARWIN, test "$build_target" = "darwin") AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin") @@ -814,34 +828,50 @@ m4/Makefile po/Makefile.in src/Makefile src/arm/Makefile +src/arm/arm.conf src/ats/Makefile +src/ats/ats.conf src/block/Makefile +src/chat/Makefile +src/chat/chat.conf src/core/Makefile +src/core/core.conf src/datacache/Makefile src/datastore/Makefile +src/datastore/datastore.conf src/dht/Makefile +src/dht/dht.conf src/dns/Makefile +src/dns/dns.conf src/dv/Makefile +src/dv/dv.conf src/exit/Makefile src/fragmentation/Makefile src/fs/Makefile +src/fs/fs.conf src/hello/Makefile src/include/Makefile src/include/gnunet_directories.h src/hostlist/Makefile src/mesh/Makefile +src/mesh/mesh.conf src/nat/Makefile src/nse/Makefile +src/nse/nse.conf src/peerinfo/Makefile +src/peerinfo/peerinfo.conf src/peerinfo-tool/Makefile src/statistics/Makefile +src/statistics/statistics.conf src/template/Makefile src/testing/Makefile src/topology/Makefile src/transport/Makefile +src/transport/transport.conf src/util/Makefile +src/util/resolver.conf src/vpn/Makefile -src/chat/Makefile +src/vpn/vpn.conf src/integration-tests/Makefile pkgconfig/Makefile pkgconfig/gnunetarm.pc diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am index 25eb7d166..7da1e2c60 100644 --- a/src/arm/Makefile.am +++ b/src/arm/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/src/include pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ arm.conf if MINGW diff --git a/src/arm/arm.conf b/src/arm/arm.conf.in similarity index 94% rename from src/arm/arm.conf rename to src/arm/arm.conf.in index fa82ea957..c1f408fd2 100644 --- a/src/arm/arm.conf +++ b/src/arm/arm.conf.in @@ -1,6 +1,6 @@ [arm] -PORT = 2087 +@UNIXONLY@ PORT = 2087 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/ats/Makefile.am b/src/ats/Makefile.am index d6ffebc8f..1f8a84a67 100644 --- a/src/ats/Makefile.am +++ b/src/ats/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/src/include pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ ats.conf if MINGW diff --git a/src/ats/ats.conf b/src/ats/ats.conf.in similarity index 95% rename from src/ats/ats.conf rename to src/ats/ats.conf.in index 3b9e1a58e..6ea0d417f 100644 --- a/src/ats/ats.conf +++ b/src/ats/ats.conf.in @@ -1,6 +1,6 @@ [ats] AUTOSTART = YES -PORT = 2098 +@UNIXONLY@ PORT = 2098 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/chat/Makefile.am b/src/chat/Makefile.am index 859e8f1f1..213283684 100644 --- a/src/chat/Makefile.am +++ b/src/chat/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/src/include pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ chat.conf if MINGW diff --git a/src/chat/chat.conf b/src/chat/chat.conf.in similarity index 94% rename from src/chat/chat.conf rename to src/chat/chat.conf.in index 61d551e16..41fe9b4f7 100644 --- a/src/chat/chat.conf +++ b/src/chat/chat.conf.in @@ -1,6 +1,6 @@ [chat] AUTOSTART = YES -PORT = 2090 +@UNIXONLY@ PORT = 2090 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 13054d15a..ad9bddcb6 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/src/include pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ core.conf if MINGW diff --git a/src/core/core.conf b/src/core/core.conf.in similarity index 94% rename from src/core/core.conf rename to src/core/core.conf.in index 3dc08312e..84e2df9fb 100644 --- a/src/core/core.conf +++ b/src/core/core.conf.in @@ -1,6 +1,6 @@ [core] AUTOSTART = YES -PORT = 2092 +@UNIXONLY@ PORT = 2092 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am index d98ebb2e1..44c5bbee4 100644 --- a/src/datastore/Makefile.am +++ b/src/datastore/Makefile.am @@ -4,7 +4,7 @@ plugindir = $(libdir)/gnunet pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ datastore.conf if MINGW diff --git a/src/datastore/datastore.conf b/src/datastore/datastore.conf.in similarity index 96% rename from src/datastore/datastore.conf rename to src/datastore/datastore.conf.in index 68de15626..837c619c2 100644 --- a/src/datastore/datastore.conf +++ b/src/datastore/datastore.conf.in @@ -3,7 +3,7 @@ AUTOSTART = YES UNIXPATH = /tmp/gnunet-service-datastore.sock UNIX_MATCH_UID = YES UNIX_MATCH_GID = YES -PORT = 2093 +@UNIXONLY@ PORT = 2093 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index e5d3c88ed..f9766a227 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am @@ -7,7 +7,7 @@ plugindir = $(libdir)/gnunet pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ dht.conf if HAVE_ZLIB diff --git a/src/dht/dht.conf b/src/dht/dht.conf.in similarity index 96% rename from src/dht/dht.conf rename to src/dht/dht.conf.in index ba903a2d0..c73c05688 100644 --- a/src/dht/dht.conf +++ b/src/dht/dht.conf.in @@ -1,6 +1,6 @@ [dht] AUTOSTART = YES -PORT = 2095 +@UNIXONLY@ PORT = 2095 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index 2a554f454..f7376a111 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am @@ -12,7 +12,7 @@ pkgcfgdir= $(pkgdatadir)/config.d/ plugindir = $(libdir)/gnunet -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ dns.conf if LINUX diff --git a/src/dns/dns.conf b/src/dns/dns.conf.in similarity index 95% rename from src/dns/dns.conf rename to src/dns/dns.conf.in index f8590bf61..cd1c2e6e3 100644 --- a/src/dns/dns.conf +++ b/src/dns/dns.conf.in @@ -1,6 +1,6 @@ [dns] AUTOSTART = YES -PORT = 0 +@UNIXONLY@ PORT = 0 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am index c0e826a2c..e0cd2e4e8 100644 --- a/src/dv/Makefile.am +++ b/src/dv/Makefile.am @@ -13,7 +13,7 @@ plugindir = $(libdir)/gnunet pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ dv.conf lib_LTLIBRARIES = libgnunetdv.la diff --git a/src/dv/dv.conf b/src/dv/dv.conf.in similarity index 79% rename from src/dv/dv.conf rename to src/dv/dv.conf.in index 8fbf23659..fa647e31c 100644 --- a/src/dv/dv.conf +++ b/src/dv/dv.conf.in @@ -7,7 +7,8 @@ BINARY = gnunet-service-dv CONFIG = $DEFAULTCONFIG HOME = $SERVICEHOME HOSTNAME = localhost -PORT = 2571 +@UNIXONLY@ PORT = 2571 +UNIXPATH = /tmp/gnunet-service-dv.sock # ACCEPT_FROM = # ACCEPT_FROM6 = # REJECT_FROM = diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index f480f2845..cbf63f335 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -11,7 +11,7 @@ endif pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ fs.conf plugindir = $(libdir)/gnunet diff --git a/src/fs/fs.conf b/src/fs/fs.conf.in similarity index 97% rename from src/fs/fs.conf rename to src/fs/fs.conf.in index 2f65859b4..48c8b5209 100644 --- a/src/fs/fs.conf +++ b/src/fs/fs.conf.in @@ -5,7 +5,7 @@ TRUST = $SERVICEHOME/data/credit/ IDENTITY_DIR = $SERVICEHOME/identities/ STATE_DIR = $SERVICEHOME/persistence/ UPDATE_DIR = $SERVICEHOME/updates/ -PORT = 2094 +@UNIXONLY@ PORT = 2094 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/mesh/Makefile.am b/src/mesh/Makefile.am index 6adcdf425..610353610 100644 --- a/src/mesh/Makefile.am +++ b/src/mesh/Makefile.am @@ -11,7 +11,7 @@ endif pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ mesh.conf AM_CLFAGS = -g diff --git a/src/mesh/mesh.conf b/src/mesh/mesh.conf.in similarity index 91% rename from src/mesh/mesh.conf rename to src/mesh/mesh.conf.in index 922275368..83a8938b2 100644 --- a/src/mesh/mesh.conf +++ b/src/mesh/mesh.conf.in @@ -1,6 +1,6 @@ [mesh] AUTOSTART = YES -PORT = 2096 +@UNIXONLY@ PORT = 2096 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/nse/Makefile.am b/src/nse/Makefile.am index 695059c64..054a77663 100644 --- a/src/nse/Makefile.am +++ b/src/nse/Makefile.am @@ -11,7 +11,7 @@ endif pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ nse.conf diff --git a/src/nse/nse.conf b/src/nse/nse.conf.in similarity index 93% rename from src/nse/nse.conf rename to src/nse/nse.conf.in index 8cc912d4d..b04f5acfe 100644 --- a/src/nse/nse.conf +++ b/src/nse/nse.conf.in @@ -1,6 +1,6 @@ [nse] AUTOSTART = YES -PORT = 2097 +@UNIXONLY@ PORT = 2097 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG @@ -8,7 +8,7 @@ BINARY = gnunet-service-nse ACCEPT_FROM = 127.0.0.1; ACCEPT_FROM6 = ::1; UNIXPATH = /tmp/test-nse-service-nse.unix -UNIX_MATCH_UID = YES +UNIX_MATCH_UID = NO UNIX_MATCH_GID = YES PROOFFILE = $SERVICEHOME/.nse-proof HISTOGRAM = $SERVICEHOME/nse-history.log diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am index 13a763b47..468fab541 100644 --- a/src/peerinfo/Makefile.am +++ b/src/peerinfo/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/src/include pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ peerinfo.conf if MINGW diff --git a/src/peerinfo/peerinfo.conf b/src/peerinfo/peerinfo.conf.in similarity index 94% rename from src/peerinfo/peerinfo.conf rename to src/peerinfo/peerinfo.conf.in index 1b300ca4b..a40cc4fba 100644 --- a/src/peerinfo/peerinfo.conf +++ b/src/peerinfo/peerinfo.conf.in @@ -1,6 +1,6 @@ [peerinfo] AUTOSTART = YES -PORT = 2090 +@UNIXONLY@ PORT = 2090 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am index 8ea7e93d2..2d1daf8d7 100644 --- a/src/statistics/Makefile.am +++ b/src/statistics/Makefile.am @@ -11,7 +11,7 @@ endif pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ statistics.conf lib_LTLIBRARIES = libgnunetstatistics.la diff --git a/src/statistics/statistics.conf b/src/statistics/statistics.conf.in similarity index 94% rename from src/statistics/statistics.conf rename to src/statistics/statistics.conf.in index e54c51963..4482b0f11 100644 --- a/src/statistics/statistics.conf +++ b/src/statistics/statistics.conf.in @@ -1,6 +1,6 @@ [statistics] AUTOSTART = YES -PORT = 2088 +@UNIXONLY@ PORT = 2088 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 210998293..fc6c8f200 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -4,7 +4,7 @@ plugindir = $(libdir)/gnunet pkgcfgdir= $(pkgdatadir)/config.d/ -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ transport.conf diff --git a/src/transport/transport.conf b/src/transport/transport.conf.in similarity index 98% rename from src/transport/transport.conf rename to src/transport/transport.conf.in index 5f742bcda..213e8f5f0 100644 --- a/src/transport/transport.conf +++ b/src/transport/transport.conf.in @@ -1,6 +1,6 @@ [transport] AUTOSTART = YES -PORT = 2091 +@UNIXONLY@ PORT = 2091 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/util/Makefile.am b/src/util/Makefile.am index ec3884dc8..7f2e0cd48 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -5,7 +5,10 @@ plugindir = $(libdir)/gnunet pkgcfgdir= $(pkgdatadir)/config.d/ dist_pkgcfg_DATA = \ - util.conf resolver.conf + util.conf + +pkgcfg_DATA = \ + resolver.conf if MINGW noinst_LTLIBRARIES = \ diff --git a/src/util/client.c b/src/util/client.c index e71ccdf39..2f09a9046 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -289,25 +289,35 @@ do_connect (const char *service_name, } #endif - if ((GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, service_name, "PORT", &port)) - || (port > 65535) || - (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, service_name, "HOSTNAME", - &hostname))) + if (GNUNET_YES == + GNUNET_CONFIGURATION_have_value (cfg, service_name, "PORT")) { - LOG (GNUNET_ERROR_TYPE_WARNING, - _ - ("Could not determine valid hostname and port for service `%s' from configuration.\n"), - service_name); - return NULL; + if ((GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (cfg, service_name, "PORT", &port)) + || (port > 65535) || + (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, service_name, "HOSTNAME", + &hostname))) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + _ + ("Could not determine valid hostname and port for service `%s' from configuration.\n"), + service_name); + return NULL; + } + if (0 == strlen (hostname)) + { + GNUNET_free (hostname); + LOG (GNUNET_ERROR_TYPE_WARNING, + _("Need a non-empty hostname for service `%s'.\n"), service_name); + return NULL; + } } - if (0 == strlen (hostname)) + else { - GNUNET_free (hostname); - LOG (GNUNET_ERROR_TYPE_WARNING, - _("Need a non-empty hostname for service `%s'.\n"), service_name); - return NULL; + /* unspecified means 0 (disabled) */ + port = 0; + hostname = NULL; } if (port == 0) { @@ -326,7 +336,7 @@ do_connect (const char *service_name, if (sock != NULL) { GNUNET_free (unixpath); - GNUNET_free (hostname); + GNUNET_free_non_null (hostname); return sock; } } @@ -338,7 +348,7 @@ do_connect (const char *service_name, "Port is 0 for service `%s', UNIXPATH did not work, returning NULL!\n", service_name); #endif - GNUNET_free (hostname); + GNUNET_free_non_null (hostname); return NULL; } diff --git a/src/util/resolver.conf b/src/util/resolver.conf.in similarity index 94% rename from src/util/resolver.conf rename to src/util/resolver.conf.in index a2690fcc3..671ea0ed6 100644 --- a/src/util/resolver.conf +++ b/src/util/resolver.conf.in @@ -1,6 +1,6 @@ [resolver] AUTOSTART = YES -PORT = 2089 +@UNIXONLY@ PORT = 2089 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am index 857232a99..be28949c5 100644 --- a/src/vpn/Makefile.am +++ b/src/vpn/Makefile.am @@ -12,7 +12,7 @@ pkgcfgdir= $(pkgdatadir)/config.d/ plugindir = $(libdir)/gnunet -dist_pkgcfg_DATA = \ +pkgcfg_DATA = \ vpn.conf if LINUX diff --git a/src/vpn/vpn.conf b/src/vpn/vpn.conf.in similarity index 94% rename from src/vpn/vpn.conf rename to src/vpn/vpn.conf.in index 0d8e1e1a5..411ad3fb9 100644 --- a/src/vpn/vpn.conf +++ b/src/vpn/vpn.conf.in @@ -1,6 +1,6 @@ [vpn] AUTOSTART = YES -PORT = 0 +@UNIXONLY@ PORT = 0 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG -- 2.25.1