chiark / gitweb /
Debian build: Install `gpio' setuid root, and world-executable.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Sep 2015 00:15:18 +0000 (00:15 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Oct 2015 13:20:48 +0000 (14:20 +0100)
Given that `gpio' doesn't take the kind of precations necessary to
avoid offering vulnerabilities, this probably enables all programs on
the pi to become root.  However (as requested by gpio upstream) we do
this to avoid howls of protest from users whose cgi programs may no
longer work, etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
debian/rules

index 6f0dec768abec8ad495466c5a1aac7b7f782fe24..082468635ecf309ac0b01d32777ea09f88e8998e 100644 (file)
@@ -4,6 +4,11 @@ wiringpi (2.28~iwj1) unstable; urgency=medium
     build; provide the old style build as `./build debian-template'
   * Have `wiringpi' be a metapackage, and use `wiringpi-tools' as
     the name of the command line tool package.
+  * Install `gpio' setuid root, and world-executable.  Given that `gpio'
+    doesn't take the kind of precations necessary to avoid offering
+    vulnerabilities, this probably enables all programs on the pi to
+    become root.  However, we do this to avoid howls of protest from users
+    whose cgi programs may no longer work, etc.
 
  --
 
index 423a47316d1eb6100eba27e52f8888ef98606d38..53779184b14c09c4754038168fd9dc4283caade1 100755 (executable)
@@ -45,5 +45,11 @@ override_dh_auto_install:
                        debian/libwiringpi-dev/usr/lib/$$l.so; \
        done
 
+override_dh_fixperms:
+       dh_fixperms
+       set -e; b=debian/wiringpi-tools/usr/bin/gpio; \
+       chown root.root $$b; \
+       chmod 4755 $$b
+
 %:
        dh $@