summary refs log tree commit diff
path: root/pkgs/desktops/enlightenment/enlightenment.suid-exes.patch
blob: f53f6ffa7ca8a46f9ad8bacd839c8c7bd7171de7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- enlightenment-0.22.0.orig/meson/meson_inst.sh	2017-09-25 10:55:43.000000000 -0300
+++ enlightenment-0.22.0/meson/meson_inst.sh	2017-11-15 08:31:03.336844920 -0200
@@ -1,6 +1,19 @@
-#!/bin/sh
+#!/bin/sh -x
+
+w="$out"/e-wrappers.nix
+
+echo "# Wrappers for programs installed by enlightenment that should be setuid" > $w
+echo "" >> $w
+echo "{" >> $w
+echo "  security.wrappers = {" >> $w
 
 for x in "$@" ; do
-	chown root "$DESTDIR/$x"
-	chmod a=rx,u+xs "$DESTDIR/$x"
+	f="$DESTDIR$x";
+	b=$(basename "$f".orig)
+	mv -v "$f" "$f".orig
+	ln -sv /run/wrappers/bin/"$b" "$f"
+	echo "    \"$b\".source = \"$f.orig\";" >> $w
 done
+
+echo "  };" >> $w
+echo "}" >> $w