aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCarlo von lynX <lynX@time.to.get.psyced.org>2016-06-29 21:50:20 +0000
committerCarlo von lynX <lynX@time.to.get.psyced.org>2016-06-29 21:50:20 +0000
commitd81be51faaee398c282356248e3ce1a36d0b46da (patch)
tree3871b03a2ec1f0f7cf2ff1ccea5d9e02b8f3ed74 /contrib
parentec2cba064ca7de430c27a5e979940a937e7dd9b7 (diff)
downloadgnunet-d81be51faaee398c282356248e3ce1a36d0b46da.tar.gz
gnunet-d81be51faaee398c282356248e3ce1a36d0b46da.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/gnunet-suidfix27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/gnunet-suidfix b/contrib/gnunet-suidfix
new file mode 100755
index 000000000..992378966
--- /dev/null
+++ b/contrib/gnunet-suidfix
@@ -0,0 +1,27 @@
1#!/bin/sh
2#
3# "suidfix" is german and it means something like immediate suicide.
4
5# taken from dangole's lede config.. thx!
6suid_root_helpers="exit nat-server nat-client transport-bluetooth transport-wlan vpn"
7libexec="${GNUNET_PREFIX}/lib/gnunet/libexec"
8
9chmodown_execbin() {
10 if [ -x $1 ]; then
11 if [ "$3" ]; then
12 chown $3 $1 2>/dev/null && chmod $2 $1
13 else
14 chmod $2 $1
15 fi
16 ls -l $1
17 else
18 echo "Missing: $1"
19 fi
20}
21
22for helper in $suid_root_helpers; do
23 chmodown_execbin ${libexec}/gnunet-helper-$helper u+s
24done
25chmodown_execbin ${libexec}/gnunet-helper-dns 4750 root:gnunetdns
26chmodown_execbin ${libexec}/gnunet-service-dns 2750 gnunet:gnunetdns
27