aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--README26
-rw-r--r--src/dns/Makefile.am17
-rwxr-xr-xsrc/dns/install-dns-helper.sh12
-rw-r--r--src/exit/Makefile.am13
-rwxr-xr-xsrc/exit/install-exit-helper.sh5
-rw-r--r--src/nat/Makefile.am18
-rwxr-xr-xsrc/nat/install-nat-helper.sh5
-rw-r--r--src/transport/Makefile.am20
-rwxr-xr-xsrc/transport/install-bluetooth-helper.sh5
-rwxr-xr-xsrc/transport/install-wlan-helper.sh5
-rw-r--r--src/vpn/Makefile.am13
-rwxr-xr-xsrc/vpn/install-vpn-helper.sh5
13 files changed, 37 insertions, 118 deletions
diff --git a/ChangeLog b/ChangeLog
index e835da236..8c24a7e5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
1Wed Oct 23 00:00:00 UTC 2019
2 Remove setuid helpers. They never worked as intended. The
3 fixed version is not portable and the defacto good way to
4 handle this which is most portable is to let package managers
5 handle this (as they do right now, the good ones), and let
6 people handle this who read the documentation.
7 This commit removes what would be patched out by the majority
8 of package managers, which is setuid handling in Makefiles.
9 It is very likely that no one will notice this code is gone.
10 -ng0
11
1Thu Oct 17 00:00:00 UTC 2019 12Thu Oct 17 00:00:00 UTC 2019
2 Added support for doas, use it in some places conditionally 13 Added support for doas, use it in some places conditionally
3 if sudo is not present. Fixed sudo detection. -ng0 14 if sudo is not present. Fixed sudo detection. -ng0
diff --git a/README b/README
index 31ab18727..75dd75694 100644
--- a/README
+++ b/README
@@ -189,6 +189,32 @@ Recommended autotools for compiling the Git version are:
189 more details. 189 more details.
190 However, this leak is just a minor concern. 190 However, this leak is just a minor concern.
191 191
192Notes on setuid
193===============
194
195For a correct functionality depending on the host OS, you need
196to run the equivalent of these steps after installation:
197
198chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-vpn
199chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-vpn
200chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-transport-wlan
201chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-transport-wlan
202chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-transport-bluetooth
203chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-transport-bluetooth
204chown root $(DESTDIR)$(libexecdir)/gnunet-helper-dns
205chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunet-helper-dns
206chmod 4750 $(DESTDIR)$(libexecdir)/gnunet-helper-dns
207chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunet-helper-dns
208chown gnunet:$(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunet-helper-dns
209chmod 2750 $(DESTDIR)$(libexecdir)/gnunet-helper-dns
210chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-exit
211chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-exit
212chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server
213chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client
214chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server
215chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client
216
217
192Requirements 218Requirements
193============ 219============
194 220
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am
index 1aea7f09a..d2598bd8a 100644
--- a/src/dns/Makefile.am
+++ b/src/dns/Makefile.am
@@ -14,25 +14,8 @@ 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
25if LINUX 17if LINUX
26HIJACKBIN = gnunet-helper-dns 18HIJACKBIN = gnunet-helper-dns
27install-exec-hook:
28 chown root $(DESTDIR)$(libexecdir)/gnunet-helper-dns
29 chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunet-helper-dns
30 chmod 4750 $(DESTDIR)$(libexecdir)/gnunet-helper-dns
31 chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunet-helper-dns
32 chown gnunet:$(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunet-helper-dns
33 chmod 2750 $(DESTDIR)$(libexecdir)/gnunet-helper-dns
34else
35install-exec-hook:
36endif 19endif
37 20
38lib_LTLIBRARIES = \ 21lib_LTLIBRARIES = \
diff --git a/src/dns/install-dns-helper.sh b/src/dns/install-dns-helper.sh
deleted file mode 100755
index 14d5caa70..000000000
--- a/src/dns/install-dns-helper.sh
+++ /dev/null
@@ -1,12 +0,0 @@
1#!/bin/sh
2# $1 - bindir
3# $2 - gnunetdns group
4# $3 - sudo binary (optional)
5$3 chown root $1/gnunet-helper-dns
6$3 chgrp $2 $1/gnunet-helper-dns
7$3 chmod 4750 $1/gnunet-helper-dns
8# In case user 'gnunet' does not exist, at least set the group
9$3 chgrp $2 $1/gnunet-service-dns
10# Usually we want both...
11$3 chown gnunet:$2 $1/gnunet-service-dns
12$3 chmod 2750 $1/gnunet-service-dns
diff --git a/src/exit/Makefile.am b/src/exit/Makefile.am
index c45354256..c0323d0d6 100644
--- a/src/exit/Makefile.am
+++ b/src/exit/Makefile.am
@@ -14,21 +14,8 @@ 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
25if LINUX 17if LINUX
26EXITBIN = gnunet-helper-exit 18EXITBIN = gnunet-helper-exit
27install-exec-hook:
28 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-exit
29 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-exit
30else
31install-exec-hook:
32endif 19endif
33 20
34 21
diff --git a/src/exit/install-exit-helper.sh b/src/exit/install-exit-helper.sh
deleted file mode 100755
index d9ae14106..000000000
--- a/src/exit/install-exit-helper.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2# $1 - bindir
3# $2 - sudo binary (optional)
4$2 chown root:root $1/gnunet-helper-exit || true
5$2 chmod u+s $1/gnunet-helper-exit || true
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am
index 2c04741da..67f5e4dbc 100644
--- a/src/nat/Makefile.am
+++ b/src/nat/Makefile.am
@@ -8,33 +8,15 @@ 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
19if LINUX 11if LINUX
20 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client 12 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
21 NATSERVER = gnunet-helper-nat-server.c 13 NATSERVER = gnunet-helper-nat-server.c
22 NATCLIENT = gnunet-helper-nat-client.c 14 NATCLIENT = gnunet-helper-nat-client.c
23install-exec-hook:
24 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server
25 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client
26 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server
27 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client
28else 15else
29if XFREEBSD 16if XFREEBSD
30 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client 17 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
31 NATSERVER = gnunet-helper-nat-server.c 18 NATSERVER = gnunet-helper-nat-server.c
32 NATCLIENT = gnunet-helper-nat-client.c 19 NATCLIENT = gnunet-helper-nat-client.c
33install-exec-hook:
34 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server
35 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client
36 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server
37 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client
38endif 20endif
39else 21else
40install-exec-hook: 22install-exec-hook:
diff --git a/src/nat/install-nat-helper.sh b/src/nat/install-nat-helper.sh
deleted file mode 100755
index d5ee91fa3..000000000
--- a/src/nat/install-nat-helper.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2# $1 - bindir
3# $2 - sudo binary (optional)
4$2 chown root:root $1/gnunet-helper-nat-server $1/gnunet-helper-nat-client || true
5$2 chmod u+s $1/gnunet-helper-nat-server $1/gnunet-helper-nat-client || true
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index b690fa345..8221b7847 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -93,26 +93,6 @@ 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
104if LINUX
105install-exec-hook:
106 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-transport-wlan
107 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-transport-wlan
108if HAVE_LIBBLUETOOTH
109 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-transport-bluetooth
110 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-transport-bluetooth
111endif
112else
113install-exec-hook:
114endif
115
116if LINUX 96if LINUX
117if HAVE_LIBBLUETOOTH 97if HAVE_LIBBLUETOOTH
118 BT_BIN = gnunet-helper-transport-bluetooth 98 BT_BIN = gnunet-helper-transport-bluetooth
diff --git a/src/transport/install-bluetooth-helper.sh b/src/transport/install-bluetooth-helper.sh
deleted file mode 100755
index 5c40250fa..000000000
--- a/src/transport/install-bluetooth-helper.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2# $1 - bindir
3# $2 - sudo binary (optional)
4$2 chown root:root $1/gnunet-helper-transport-bluetooth || true
5$2 chmod u+s $1/gnunet-helper-transport-bluetooth || true
diff --git a/src/transport/install-wlan-helper.sh b/src/transport/install-wlan-helper.sh
deleted file mode 100755
index 0fa9c9806..000000000
--- a/src/transport/install-wlan-helper.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2# $1 - bindir
3# $2 - sudo binary (optional)
4$2 chown root:root $1/gnunet-helper-transport-wlan || true
5$2 chmod u+s $1/gnunet-helper-transport-wlan || true
diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am
index 9992fa5ed..407d8ba92 100644
--- a/src/vpn/Makefile.am
+++ b/src/vpn/Makefile.am
@@ -14,21 +14,8 @@ 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
25if LINUX 17if LINUX
26VPNBIN = gnunet-helper-vpn 18VPNBIN = gnunet-helper-vpn
27install-exec-hook:
28 chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-vpn
29 chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-vpn
30else
31install-exec-hook:
32endif 19endif
33 20
34 21
diff --git a/src/vpn/install-vpn-helper.sh b/src/vpn/install-vpn-helper.sh
deleted file mode 100755
index 086dabb67..000000000
--- a/src/vpn/install-vpn-helper.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2# $1 - bindir
3# $2 - sudo binary (optional)
4$2 chown root:root $1/gnunet-helper-vpn || true
5$2 chmod u+s $1/gnunet-helper-vpn || true