diff options
author | ng0 <ng0@n0.is> | 2019-10-17 13:49:49 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-10-17 13:49:49 +0000 |
commit | 9d41ec39756a783c53bb06581ea189c95e08c4d6 (patch) | |
tree | 08263348bc5cbeaa8e0a5dc21fcf0fdaabb7184a /src | |
parent | 22ad43e23641318de7f50084aa816a6fda14d7ec (diff) |
Add support for doas.
Diffstat (limited to 'src')
-rw-r--r-- | src/dns/Makefile.am | 10 | ||||
-rw-r--r-- | src/exit/Makefile.am | 10 | ||||
-rw-r--r-- | src/gns/Makefile.am | 10 | ||||
-rw-r--r-- | src/nat/Makefile.am | 22 | ||||
-rw-r--r-- | src/transport/Makefile.am | 12 | ||||
-rw-r--r-- | src/vpn/Makefile.am | 10 |
6 files changed, 61 insertions, 13 deletions
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index 33ec8ef85..acf9660f7 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am @@ -14,10 +14,18 @@ plugindir = $(libdir)/gnunet pkgcfg_DATA = \ dns.conf +if HAVE_SUDO +SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) +else +if HAVE_DOAS_BINARY +SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) +endif +endif + if LINUX HIJACKBIN = gnunet-helper-dns install-exec-hook: - $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true + $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_OR_DOAS_BINARY) || true else install-exec-hook: endif diff --git a/src/exit/Makefile.am b/src/exit/Makefile.am index b7286349d..bca0f1d9f 100644 --- a/src/exit/Makefile.am +++ b/src/exit/Makefile.am @@ -14,10 +14,18 @@ plugindir = $(libdir)/gnunet dist_pkgcfg_DATA = \ exit.conf +if HAVE_SUDO +SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) +else +if HAVE_DOAS_BINARY +SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) +endif +endif + if LINUX EXITBIN = gnunet-helper-exit install-exec-hook: - $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true + $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true else install-exec-hook: endif diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 6cc09c098..48d13e3c0 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am @@ -158,10 +158,18 @@ gnunet_dns2gns_LDADD = \ $(top_builddir)/src/identity/libgnunetidentity.la \ $(GN_LIBINTL) +if HAVE_SUDO +SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) +else +if HAVE_DOAS_BINARY +SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) +endif +endif + if LINUX HIJACKBIN = gnunet-dns2gns install-exec-hook: - $(SUDO_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true + $(SUDO_OR_DOAS_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true else install-exec-hook: endif diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index db104d194..d88dd6db4 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am @@ -8,19 +8,27 @@ pkgcfgdir= $(pkgdatadir)/config.d/ pkgcfg_DATA = \ nat.conf +if HAVE_SUDO +SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) +else +if HAVE_DOAS_BINARY +SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) +endif +endif + if LINUX NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client NATSERVER = gnunet-helper-nat-server.c NATCLIENT = gnunet-helper-nat-client.c install-exec-hook: - $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true + $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true else if XFREEBSD NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client NATSERVER = gnunet-helper-nat-server.c NATCLIENT = gnunet-helper-nat-client.c install-exec-hook: - $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true + $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true endif else install-exec-hook: @@ -61,7 +69,7 @@ libgnunetnatnew_la_SOURCES = \ nat.h libgnunetnatnew_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la \ - $(GN_LIBINTL) @EXT_LIBS@ + $(GN_LIBINTL) @EXT_LIBS@ libgnunetnatnew_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) $(WINFLAGS) \ -version-info 2:0:0 @@ -94,25 +102,25 @@ endif # test_nat.c #test_nat_LDADD = \ # libgnunetnat.la \ -# $(top_builddir)/src/util/libgnunetutil.la +# $(top_builddir)/src/util/libgnunetutil.la #test_nat_mini_SOURCES = \ # test_nat_mini.c #test_nat_mini_LDADD = \ # libgnunetnat.la \ -# $(top_builddir)/src/util/libgnunetutil.la +# $(top_builddir)/src/util/libgnunetutil.la #test_nat_test_SOURCES = \ # test_nat_test.c #test_nat_test_LDADD = \ # libgnunetnat.la \ -# $(top_builddir)/src/util/libgnunetutil.la +# $(top_builddir)/src/util/libgnunetutil.la #test_stun_SOURCES = \ # test_stun.c #test_stun_LDADD = \ # libgnunetnat.la \ -# $(top_builddir)/src/util/libgnunetutil.la +# $(top_builddir)/src/util/libgnunetutil.la EXTRA_DIST = \ test_nat_data.conf \ diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 0f5b2e8be..178ecc737 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -93,11 +93,19 @@ if LINUX test_quota_compliance_wlan_asymmetric endif +if HAVE_SUDO +SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) +else +if HAVE_DOAS_BINARY +SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) +endif +endif + if LINUX install-exec-hook: - $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true + $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true if HAVE_LIBBLUETOOTH - $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true + $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true endif else install-exec-hook: diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am index 3ad9b1a54..4d7ca087e 100644 --- a/src/vpn/Makefile.am +++ b/src/vpn/Makefile.am @@ -14,10 +14,18 @@ plugindir = $(libdir)/gnunet pkgcfg_DATA = \ vpn.conf +if HAVE_SUDO +SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) +else +if HAVE_DOAS_BINARY +SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) +endif +endif + if LINUX VPNBIN = gnunet-helper-vpn install-exec-hook: - $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true + $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true else install-exec-hook: endif |