aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-08-01 07:20:37 +0000
committerChristian Grothoff <christian@grothoff.org>2012-08-01 07:20:37 +0000
commitb7ca6765f707bdf074b948d17ce9e458f0bd680d (patch)
tree017b209c01c8a7fb047aacdc426e42a28370c14e
parent94c672c467be073e9b62fe2c1b45267163f74db5 (diff)
downloadgnunet-b7ca6765f707bdf074b948d17ce9e458f0bd680d.tar.gz
gnunet-b7ca6765f707bdf074b948d17ce9e458f0bd680d.zip
-fixing installation scripts for suid binaries
-rw-r--r--src/dns/Makefile.am2
-rw-r--r--src/dns/install-dns-helper.sh16
-rw-r--r--src/exit/Makefile.am2
-rw-r--r--src/exit/install-exit-helper.sh10
-rw-r--r--src/nat/Makefile.am8
-rw-r--r--src/nat/install-nat-helper.sh9
-rw-r--r--src/transport/Makefile.am2
-rw-r--r--src/transport/install-wlan-helper.sh8
-rw-r--r--src/vpn/Makefile.am2
-rw-r--r--src/vpn/install-vpn-helper.sh8
10 files changed, 30 insertions, 37 deletions
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am
index 59395700a..8a102c414 100644
--- a/src/dns/Makefile.am
+++ b/src/dns/Makefile.am
@@ -18,7 +18,7 @@ pkgcfg_DATA = \
18if LINUX 18if LINUX
19HIJACKBIN = gnunet-helper-dns 19HIJACKBIN = gnunet-helper-dns
20install-exec-hook: 20install-exec-hook:
21 $(top_srcdir)/src/dns/install-dns-helper.sh $(SUDO_BINARY) $(bindir) $(GNUNETDNS_GROUP) || true 21 $(top_srcdir)/src/dns/install-dns-helper.sh $(bindir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true
22else 22else
23install-exec-hook: 23install-exec-hook:
24endif 24endif
diff --git a/src/dns/install-dns-helper.sh b/src/dns/install-dns-helper.sh
index ac42e1f29..bf2dd427d 100644
--- a/src/dns/install-dns-helper.sh
+++ b/src/dns/install-dns-helper.sh
@@ -1,9 +1,9 @@
1#!/bin/bash 1#!/bin/bash
2# $1 - sudo binary 2# $1 - bindir
3# $2 - bindir 3# $2 - gnunetdns group
4# $3 - gnunetdns group 4# $3 - sudo binary (optional)
5$1 chown root $2/gnunet-helper-dns || true 5$3 chown root $1/gnunet-helper-dns || true
6$1 chgrp $3 $2/gnunet-helper-dns || true 6$3 chgrp $2 $1/gnunet-helper-dns || true
7$1 chmod 4750 $2/gnunet-helper-dns || true 7$3 chmod 4750 $1/gnunet-helper-dns || true
8$1 chown gnunet:$3 $2/gnunet-service-dns || true 8$3 chown gnunet:$2 $1/gnunet-service-dns || true
9$1 chmod 2750 $2/gnunet-service-dns || true 9$3 chmod 2750 $1/gnunet-service-dns || true
diff --git a/src/exit/Makefile.am b/src/exit/Makefile.am
index b0b36c661..bc41e5c2c 100644
--- a/src/exit/Makefile.am
+++ b/src/exit/Makefile.am
@@ -18,7 +18,7 @@ dist_pkgcfg_DATA = \
18if LINUX 18if LINUX
19EXITBIN = gnunet-helper-exit 19EXITBIN = gnunet-helper-exit
20install-exec-hook: 20install-exec-hook:
21 $(top_srcdir)/src/exit/install-exit-helper.sh $(SUDO_BINARY) $(bindir) || true 21 $(top_srcdir)/src/exit/install-exit-helper.sh $(bindir) $(SUDO_BINARY) || true
22else 22else
23install-exec-hook: 23install-exec-hook:
24endif 24endif
diff --git a/src/exit/install-exit-helper.sh b/src/exit/install-exit-helper.sh
index afe37ec5e..76af4efa7 100644
--- a/src/exit/install-exit-helper.sh
+++ b/src/exit/install-exit-helper.sh
@@ -1,5 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# $1 - sudo binary 2# $1 - bindir
3# $2 - bindir 3# $2 - sudo binary (optional)
4$1 chown root:root $2/gnunet-helper-exit || true 4$2 chown root:root $1/gnunet-helper-exit || true
5$1 chmod u+s $2/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 e706a3a00..e4b36caa2 100644
--- a/src/nat/Makefile.am
+++ b/src/nat/Makefile.am
@@ -12,18 +12,12 @@ pkgcfgdir= $(pkgdatadir)/config.d/
12dist_pkgcfg_DATA = \ 12dist_pkgcfg_DATA = \
13 nat.conf 13 nat.conf
14 14
15
16if ENABLE_TEST_RUN
17 nattest = $(bindir)/gnunet-nat-server
18endif
19
20
21if LINUX 15if LINUX
22NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client 16NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
23NATSERVER = gnunet-helper-nat-server.c 17NATSERVER = gnunet-helper-nat-server.c
24NATCLIENT = gnunet-helper-nat-client.c 18NATCLIENT = gnunet-helper-nat-client.c
25install-exec-hook: 19install-exec-hook:
26 $(top_srcdir)/src/nat/install-nat-helper.sh $(SUDO_BINARY) $(bindir) $(nattest) || true 20 $(top_srcdir)/src/nat/install-nat-helper.sh $(bindir) $(SUDO_BINARY) || true
27else 21else
28install-exec-hook: 22install-exec-hook:
29endif 23endif
diff --git a/src/nat/install-nat-helper.sh b/src/nat/install-nat-helper.sh
index 158c9fb15..502aa71f1 100644
--- a/src/nat/install-nat-helper.sh
+++ b/src/nat/install-nat-helper.sh
@@ -1,6 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# $1 - sudo binary 2# $1 - bindir
3# $2 - bindir 3# $2 - sudo binary (optional)
4# $3 - nattest 4$2 chown root:root $1/gnunet-helper-nat-server $1/gnunet-helper-nat-client || true
5$1 chown root:root $2/gnunet-helper-nat-server $2/gnunet-helper-nat-client $3 || true 5$2 chmod u+s $1/gnunet-helper-nat-server $1/gnunet-helper-nat-client || true
6$1 chmod u+s $2/gnunet-helper-nat-server $2/gnunet-helper-nat-client $3 || true
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index afbd10932..bee00d354 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -47,7 +47,7 @@ endif
47 47
48if LINUX 48if LINUX
49install-exec-hook: 49install-exec-hook:
50 $(top_srcdir)/src/transport/install-wlan-helper.sh $(SUDO_BINARY) $(bindir) || true 50 $(top_srcdir)/src/transport/install-wlan-helper.sh $(bindir) $(SUDO_BINARY) || true
51else 51else
52install-exec-hook: 52install-exec-hook:
53endif 53endif
diff --git a/src/transport/install-wlan-helper.sh b/src/transport/install-wlan-helper.sh
index 30258b8ce..54b3360be 100644
--- a/src/transport/install-wlan-helper.sh
+++ b/src/transport/install-wlan-helper.sh
@@ -1,5 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# $1 - sudo binary 2# $1 - bindir
3# $2 - bindir 3# $2 - sudo binary (optional)
4$1 chown root:root $2/gnunet-helper-transport-wlan || true 4$2 chown root:root $1/gnunet-helper-transport-wlan || true
5$1 chmod u+s $2/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 2826028e8..e7802bc9a 100644
--- a/src/vpn/Makefile.am
+++ b/src/vpn/Makefile.am
@@ -18,7 +18,7 @@ pkgcfg_DATA = \
18if LINUX 18if LINUX
19VPNBIN = gnunet-helper-vpn 19VPNBIN = gnunet-helper-vpn
20install-exec-hook: 20install-exec-hook:
21 $(top_srcdir)/src/nat/install-vpn-helper.sh $(SUDO_BINARY) $(bindir) || true 21 $(top_srcdir)/src/vpn/install-vpn-helper.sh $(bindir) $(SUDO_BINARY) || true
22else 22else
23install-exec-hook: 23install-exec-hook:
24endif 24endif
diff --git a/src/vpn/install-vpn-helper.sh b/src/vpn/install-vpn-helper.sh
index fbef41c7e..0996e7839 100644
--- a/src/vpn/install-vpn-helper.sh
+++ b/src/vpn/install-vpn-helper.sh
@@ -1,5 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# $1 - sudo binary 2# $1 - bindir
3# $2 - bindir 3# $2 - sudo binary (optional)
4$1 chown root:root $2/gnunet-helper-vpn || true 4$2 chown root:root $1/gnunet-helper-vpn || true
5$1 chmod u+s $2/gnunet-helper-vpn || true 5$2 chmod u+s $1/gnunet-helper-vpn || true