diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-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 |
8 files changed, 70 insertions, 15 deletions
@@ -1,5 +1,9 @@ | |||
1 | Thu 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 | |||
1 | Mon Oct 14 00:00:00 UTC 2019 | 5 | Mon 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 | ||
5 | Mon Sep 16 00:00:00 UTC 2019 | 9 | Mon 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 | |||
1357 | AC_SUBST(DATAROOTDIR) | 1357 | AC_SUBST(DATAROOTDIR) |
1358 | 1358 | ||
1359 | # test for sudo | 1359 | # test for sudo |
1360 | # TODO: do we need to change anything for "doas" on openbsd? | ||
1361 | AC_MSG_CHECKING(for sudo) | 1360 | AC_MSG_CHECKING(for sudo) |
1362 | AC_ARG_WITH(sudo, | 1361 | AC_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) | |||
1371 | AM_CONDITIONAL([HAVE_SUDO], | 1370 | AM_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 | ||
1374 | AC_MSG_CHECKING(for doas) | ||
1375 | AC_CHECK_PROGS(DOAS_BINARY, [doas], false) | ||
1376 | AM_CONDITIONAL(HAVE_DOAS_BINARY, test x$DOAS_BINARY != xfalse) | ||
1374 | 1377 | ||
1375 | # test for gnunetdns group name | 1378 | # test for gnunetdns group name |
1376 | GNUNETDNS_GROUP=gnunetdns | 1379 | GNUNETDNS_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 | |||
14 | pkgcfg_DATA = \ | 14 | pkgcfg_DATA = \ |
15 | dns.conf | 15 | dns.conf |
16 | 16 | ||
17 | if HAVE_SUDO | ||
18 | SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) | ||
19 | else | ||
20 | if HAVE_DOAS_BINARY | ||
21 | SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) | ||
22 | endif | ||
23 | endif | ||
24 | |||
17 | if LINUX | 25 | if LINUX |
18 | HIJACKBIN = gnunet-helper-dns | 26 | HIJACKBIN = gnunet-helper-dns |
19 | install-exec-hook: | 27 | install-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 |
21 | else | 29 | else |
22 | install-exec-hook: | 30 | install-exec-hook: |
23 | endif | 31 | 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 | |||
14 | dist_pkgcfg_DATA = \ | 14 | dist_pkgcfg_DATA = \ |
15 | exit.conf | 15 | exit.conf |
16 | 16 | ||
17 | if HAVE_SUDO | ||
18 | SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) | ||
19 | else | ||
20 | if HAVE_DOAS_BINARY | ||
21 | SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) | ||
22 | endif | ||
23 | endif | ||
24 | |||
17 | if LINUX | 25 | if LINUX |
18 | EXITBIN = gnunet-helper-exit | 26 | EXITBIN = gnunet-helper-exit |
19 | install-exec-hook: | 27 | install-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 |
21 | else | 29 | else |
22 | install-exec-hook: | 30 | install-exec-hook: |
23 | endif | 31 | 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 = \ | |||
158 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 158 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
159 | $(GN_LIBINTL) | 159 | $(GN_LIBINTL) |
160 | 160 | ||
161 | if HAVE_SUDO | ||
162 | SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) | ||
163 | else | ||
164 | if HAVE_DOAS_BINARY | ||
165 | SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) | ||
166 | endif | ||
167 | endif | ||
168 | |||
161 | if LINUX | 169 | if LINUX |
162 | HIJACKBIN = gnunet-dns2gns | 170 | HIJACKBIN = gnunet-dns2gns |
163 | install-exec-hook: | 171 | install-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 |
165 | else | 173 | else |
166 | install-exec-hook: | 174 | install-exec-hook: |
167 | endif | 175 | 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/ | |||
8 | pkgcfg_DATA = \ | 8 | pkgcfg_DATA = \ |
9 | nat.conf | 9 | nat.conf |
10 | 10 | ||
11 | if HAVE_SUDO | ||
12 | SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) | ||
13 | else | ||
14 | if HAVE_DOAS_BINARY | ||
15 | SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) | ||
16 | endif | ||
17 | endif | ||
18 | |||
11 | if LINUX | 19 | if 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 |
15 | install-exec-hook: | 23 | install-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 |
17 | else | 25 | else |
18 | if XFREEBSD | 26 | if 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 |
22 | install-exec-hook: | 30 | install-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 |
24 | endif | 32 | endif |
25 | else | 33 | else |
26 | install-exec-hook: | 34 | install-exec-hook: |
@@ -61,7 +69,7 @@ libgnunetnatnew_la_SOURCES = \ | |||
61 | nat.h | 69 | nat.h |
62 | libgnunetnatnew_la_LIBADD = \ | 70 | libgnunetnatnew_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@ |
65 | libgnunetnatnew_la_LDFLAGS = \ | 73 | libgnunetnatnew_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 | ||
117 | EXTRA_DIST = \ | 125 | EXTRA_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 |
94 | endif | 94 | endif |
95 | 95 | ||
96 | if HAVE_SUDO | ||
97 | SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) | ||
98 | else | ||
99 | if HAVE_DOAS_BINARY | ||
100 | SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) | ||
101 | endif | ||
102 | endif | ||
103 | |||
96 | if LINUX | 104 | if LINUX |
97 | install-exec-hook: | 105 | install-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 |
99 | if HAVE_LIBBLUETOOTH | 107 | if 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 |
101 | endif | 109 | endif |
102 | else | 110 | else |
103 | install-exec-hook: | 111 | 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 | |||
14 | pkgcfg_DATA = \ | 14 | pkgcfg_DATA = \ |
15 | vpn.conf | 15 | vpn.conf |
16 | 16 | ||
17 | if HAVE_SUDO | ||
18 | SUDO_OR_DOAS_BINARY= $(SUDO_BINARY) | ||
19 | else | ||
20 | if HAVE_DOAS_BINARY | ||
21 | SUDO_OR_DOAS_BINARY= $(DOAS_BINARY) | ||
22 | endif | ||
23 | endif | ||
24 | |||
17 | if LINUX | 25 | if LINUX |
18 | VPNBIN = gnunet-helper-vpn | 26 | VPNBIN = gnunet-helper-vpn |
19 | install-exec-hook: | 27 | install-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 |
21 | else | 29 | else |
22 | install-exec-hook: | 30 | install-exec-hook: |
23 | endif | 31 | endif |