aboutsummaryrefslogtreecommitdiff
path: root/contrib/scripts/gnunet-suidfix
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-05-19 14:43:13 +0000
committerNils Gillmann <ng0@n0.is>2018-05-19 14:43:13 +0000
commit6ab60d4920bb3199aee8cd872b930e9e3e808ba7 (patch)
tree3d761dbf8793a1d2422fbd14667255c7e0292ea4 /contrib/scripts/gnunet-suidfix
parentc2f27dfe8218545c327ab49d225a49910347c5c6 (diff)
downloadgnunet-6ab60d4920bb3199aee8cd872b930e9e3e808ba7.tar.gz
gnunet-6ab60d4920bb3199aee8cd872b930e9e3e808ba7.zip
Restructure contrib folder.
contrib/pogen.sh -> bin/pogen.sh bootstrap: Use new pogen location and execute it. contrib/openvpn-tap32: Move to contrib/3rdparty/Windows/openvpn-tap32. contrib/gnunet-logo*: Move to contrib/branding/logo/ Delete old patches in contrib, predating git. Move buildbot data to contrib/ci/buildbot, move docker data to contrib/ci/docker. Create contrib/conf and populate it with config files found in contrib and bin. Move gns related data to contrib/gns. delete contrib/repeat.sh Move contrib/log.php into contrib/web/log.php. Create folder contrib/scripts and use it for most scripts in contrib. Remove trailing whitespace in doc/Makefile.am Signed-off-by: Nils Gillmann <ng0@n0.is>
Diffstat (limited to 'contrib/scripts/gnunet-suidfix')
-rwxr-xr-xcontrib/scripts/gnunet-suidfix27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/scripts/gnunet-suidfix b/contrib/scripts/gnunet-suidfix
new file mode 100755
index 000000000..992378966
--- /dev/null
+++ b/contrib/scripts/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