diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-08-01 07:20:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-08-01 07:20:37 +0000 |
commit | b7ca6765f707bdf074b948d17ce9e458f0bd680d (patch) | |
tree | 017b209c01c8a7fb047aacdc426e42a28370c14e /src | |
parent | 94c672c467be073e9b62fe2c1b45267163f74db5 (diff) | |
download | gnunet-b7ca6765f707bdf074b948d17ce9e458f0bd680d.tar.gz gnunet-b7ca6765f707bdf074b948d17ce9e458f0bd680d.zip |
-fixing installation scripts for suid binaries
Diffstat (limited to 'src')
-rw-r--r-- | src/dns/Makefile.am | 2 | ||||
-rw-r--r-- | src/dns/install-dns-helper.sh | 16 | ||||
-rw-r--r-- | src/exit/Makefile.am | 2 | ||||
-rw-r--r-- | src/exit/install-exit-helper.sh | 10 | ||||
-rw-r--r-- | src/nat/Makefile.am | 8 | ||||
-rw-r--r-- | src/nat/install-nat-helper.sh | 9 | ||||
-rw-r--r-- | src/transport/Makefile.am | 2 | ||||
-rw-r--r-- | src/transport/install-wlan-helper.sh | 8 | ||||
-rw-r--r-- | src/vpn/Makefile.am | 2 | ||||
-rw-r--r-- | src/vpn/install-vpn-helper.sh | 8 |
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 = \ | |||
18 | if LINUX | 18 | if LINUX |
19 | HIJACKBIN = gnunet-helper-dns | 19 | HIJACKBIN = gnunet-helper-dns |
20 | install-exec-hook: | 20 | install-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 |
22 | else | 22 | else |
23 | install-exec-hook: | 23 | install-exec-hook: |
24 | endif | 24 | endif |
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 = \ | |||
18 | if LINUX | 18 | if LINUX |
19 | EXITBIN = gnunet-helper-exit | 19 | EXITBIN = gnunet-helper-exit |
20 | install-exec-hook: | 20 | install-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 |
22 | else | 22 | else |
23 | install-exec-hook: | 23 | install-exec-hook: |
24 | endif | 24 | endif |
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/ | |||
12 | dist_pkgcfg_DATA = \ | 12 | dist_pkgcfg_DATA = \ |
13 | nat.conf | 13 | nat.conf |
14 | 14 | ||
15 | |||
16 | if ENABLE_TEST_RUN | ||
17 | nattest = $(bindir)/gnunet-nat-server | ||
18 | endif | ||
19 | |||
20 | |||
21 | if LINUX | 15 | if LINUX |
22 | NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client | 16 | NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client |
23 | NATSERVER = gnunet-helper-nat-server.c | 17 | NATSERVER = gnunet-helper-nat-server.c |
24 | NATCLIENT = gnunet-helper-nat-client.c | 18 | NATCLIENT = gnunet-helper-nat-client.c |
25 | install-exec-hook: | 19 | install-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 |
27 | else | 21 | else |
28 | install-exec-hook: | 22 | install-exec-hook: |
29 | endif | 23 | endif |
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 | ||
48 | if LINUX | 48 | if LINUX |
49 | install-exec-hook: | 49 | install-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 |
51 | else | 51 | else |
52 | install-exec-hook: | 52 | install-exec-hook: |
53 | endif | 53 | endif |
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 = \ | |||
18 | if LINUX | 18 | if LINUX |
19 | VPNBIN = gnunet-helper-vpn | 19 | VPNBIN = gnunet-helper-vpn |
20 | install-exec-hook: | 20 | install-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 |
22 | else | 22 | else |
23 | install-exec-hook: | 23 | install-exec-hook: |
24 | endif | 24 | endif |
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 |