summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac5
-rw-r--r--src/dns/Makefile.am10
-rw-r--r--src/exit/Makefile.am10
-rw-r--r--src/gns/Makefile.am10
-rw-r--r--src/nat/Makefile.am22
-rw-r--r--src/transport/Makefile.am12
-rw-r--r--src/vpn/Makefile.am10
8 files changed, 70 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 315c869e4..3e083f2eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1Thu Oct 17 00:00:00 UTC 2019
2 Added support for doas, use it in some places conditionally
3 if sudo is not present. -ng0
4
1Mon Oct 14 00:00:00 UTC 2019 5Mon Oct 14 00:00:00 UTC 2019
2 Add 'pretty' make rule to run uncrustify over the source tree. 6 Added 'pretty' make rule to run uncrustify over the source tree.
3 -ng0 7 -ng0
4 8
5Mon Sep 16 00:00:00 UTC 2019 9Mon Sep 16 00:00:00 UTC 2019
diff --git a/configure.ac b/configure.ac
index f56d2f508..f1c93b309 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1357,7 +1357,6 @@ DATAROOTDIR=$datarootdir
1357AC_SUBST(DATAROOTDIR) 1357AC_SUBST(DATAROOTDIR)
1358 1358
1359# test for sudo 1359# test for sudo
1360# TODO: do we need to change anything for "doas" on openbsd?
1361AC_MSG_CHECKING(for sudo) 1360AC_MSG_CHECKING(for sudo)
1362AC_ARG_WITH(sudo, 1361AC_ARG_WITH(sudo,
1363 [ --with-sudo=PATH path to sudo binary (or just yes)], 1362 [ --with-sudo=PATH path to sudo binary (or just yes)],
@@ -1371,6 +1370,10 @@ AC_SUBST(SUDO_BINARY)
1371AM_CONDITIONAL([HAVE_SUDO], 1370AM_CONDITIONAL([HAVE_SUDO],
1372 [test "x$SUDO_BINARY" != "x" -o -w /]) 1371 [test "x$SUDO_BINARY" != "x" -o -w /])
1373 1372
1373# test for doas
1374AC_MSG_CHECKING(for doas)
1375AC_CHECK_PROGS(DOAS_BINARY, [doas], false)
1376AM_CONDITIONAL(HAVE_DOAS_BINARY, test x$DOAS_BINARY != xfalse)
1374 1377
1375# test for gnunetdns group name 1378# test for gnunetdns group name
1376GNUNETDNS_GROUP=gnunetdns 1379GNUNETDNS_GROUP=gnunetdns
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
14pkgcfg_DATA = \ 14pkgcfg_DATA = \
15 dns.conf 15 dns.conf
16 16
17if HAVE_SUDO
18SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
19else
20if HAVE_DOAS_BINARY
21SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
22endif
23endif
24
17if LINUX 25if LINUX
18HIJACKBIN = gnunet-helper-dns 26HIJACKBIN = gnunet-helper-dns
19install-exec-hook: 27install-exec-hook:
20 $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true 28 $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_OR_DOAS_BINARY) || true
21else 29else
22install-exec-hook: 30install-exec-hook:
23endif 31endif
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
14dist_pkgcfg_DATA = \ 14dist_pkgcfg_DATA = \
15 exit.conf 15 exit.conf
16 16
17if HAVE_SUDO
18SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
19else
20if HAVE_DOAS_BINARY
21SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
22endif
23endif
24
17if LINUX 25if LINUX
18EXITBIN = gnunet-helper-exit 26EXITBIN = gnunet-helper-exit
19install-exec-hook: 27install-exec-hook:
20 $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true 28 $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
21else 29else
22install-exec-hook: 30install-exec-hook:
23endif 31endif
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 = \
158 $(top_builddir)/src/identity/libgnunetidentity.la \ 158 $(top_builddir)/src/identity/libgnunetidentity.la \
159 $(GN_LIBINTL) 159 $(GN_LIBINTL)
160 160
161if HAVE_SUDO
162SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
163else
164if HAVE_DOAS_BINARY
165SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
166endif
167endif
168
161if LINUX 169if LINUX
162HIJACKBIN = gnunet-dns2gns 170HIJACKBIN = gnunet-dns2gns
163install-exec-hook: 171install-exec-hook:
164 $(SUDO_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true 172 $(SUDO_OR_DOAS_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true
165else 173else
166install-exec-hook: 174install-exec-hook:
167endif 175endif
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/
8pkgcfg_DATA = \ 8pkgcfg_DATA = \
9 nat.conf 9 nat.conf
10 10
11if HAVE_SUDO
12SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
13else
14if HAVE_DOAS_BINARY
15SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
16endif
17endif
18
11if LINUX 19if LINUX
12 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client 20 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
13 NATSERVER = gnunet-helper-nat-server.c 21 NATSERVER = gnunet-helper-nat-server.c
14 NATCLIENT = gnunet-helper-nat-client.c 22 NATCLIENT = gnunet-helper-nat-client.c
15install-exec-hook: 23install-exec-hook:
16 $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true 24 $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
17else 25else
18if XFREEBSD 26if XFREEBSD
19 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client 27 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
20 NATSERVER = gnunet-helper-nat-server.c 28 NATSERVER = gnunet-helper-nat-server.c
21 NATCLIENT = gnunet-helper-nat-client.c 29 NATCLIENT = gnunet-helper-nat-client.c
22install-exec-hook: 30install-exec-hook:
23 $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true 31 $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
24endif 32endif
25else 33else
26install-exec-hook: 34install-exec-hook:
@@ -61,7 +69,7 @@ libgnunetnatnew_la_SOURCES = \
61 nat.h 69 nat.h
62libgnunetnatnew_la_LIBADD = \ 70libgnunetnatnew_la_LIBADD = \
63 $(top_builddir)/src/util/libgnunetutil.la \ 71 $(top_builddir)/src/util/libgnunetutil.la \
64 $(GN_LIBINTL) @EXT_LIBS@ 72 $(GN_LIBINTL) @EXT_LIBS@
65libgnunetnatnew_la_LDFLAGS = \ 73libgnunetnatnew_la_LDFLAGS = \
66 $(GN_LIB_LDFLAGS) $(WINFLAGS) \ 74 $(GN_LIB_LDFLAGS) $(WINFLAGS) \
67 -version-info 2:0:0 75 -version-info 2:0:0
@@ -94,25 +102,25 @@ endif
94# test_nat.c 102# test_nat.c
95#test_nat_LDADD = \ 103#test_nat_LDADD = \
96# libgnunetnat.la \ 104# libgnunetnat.la \
97# $(top_builddir)/src/util/libgnunetutil.la 105# $(top_builddir)/src/util/libgnunetutil.la
98 106
99#test_nat_mini_SOURCES = \ 107#test_nat_mini_SOURCES = \
100# test_nat_mini.c 108# test_nat_mini.c
101#test_nat_mini_LDADD = \ 109#test_nat_mini_LDADD = \
102# libgnunetnat.la \ 110# libgnunetnat.la \
103# $(top_builddir)/src/util/libgnunetutil.la 111# $(top_builddir)/src/util/libgnunetutil.la
104 112
105#test_nat_test_SOURCES = \ 113#test_nat_test_SOURCES = \
106# test_nat_test.c 114# test_nat_test.c
107#test_nat_test_LDADD = \ 115#test_nat_test_LDADD = \
108# libgnunetnat.la \ 116# libgnunetnat.la \
109# $(top_builddir)/src/util/libgnunetutil.la 117# $(top_builddir)/src/util/libgnunetutil.la
110 118
111#test_stun_SOURCES = \ 119#test_stun_SOURCES = \
112# test_stun.c 120# test_stun.c
113#test_stun_LDADD = \ 121#test_stun_LDADD = \
114# libgnunetnat.la \ 122# libgnunetnat.la \
115# $(top_builddir)/src/util/libgnunetutil.la 123# $(top_builddir)/src/util/libgnunetutil.la
116 124
117EXTRA_DIST = \ 125EXTRA_DIST = \
118 test_nat_data.conf \ 126 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
93 test_quota_compliance_wlan_asymmetric 93 test_quota_compliance_wlan_asymmetric
94endif 94endif
95 95
96if HAVE_SUDO
97SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
98else
99if HAVE_DOAS_BINARY
100SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
101endif
102endif
103
96if LINUX 104if LINUX
97install-exec-hook: 105install-exec-hook:
98 $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true 106 $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
99if HAVE_LIBBLUETOOTH 107if HAVE_LIBBLUETOOTH
100 $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true 108 $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
101endif 109endif
102else 110else
103install-exec-hook: 111install-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
14pkgcfg_DATA = \ 14pkgcfg_DATA = \
15 vpn.conf 15 vpn.conf
16 16
17if HAVE_SUDO
18SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
19else
20if HAVE_DOAS_BINARY
21SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
22endif
23endif
24
17if LINUX 25if LINUX
18VPNBIN = gnunet-helper-vpn 26VPNBIN = gnunet-helper-vpn
19install-exec-hook: 27install-exec-hook:
20 $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true 28 $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
21else 29else
22install-exec-hook: 30install-exec-hook:
23endif 31endif