Package: src:airspy-host
Version: 1.0.8-1
Tags: patch
Severity: important
When installing Debian, the initial user was traditionally made a member
of the plugdev group, and this granted access to local hardware dongles
when this user is logged in. This approach causes problems for users
originating from directory services like LDAP and Active Directory, as
such plugdev membership can not be granted globally. The plugdev
membership can be assigned during login (using pam_group), but still
this approach is problematic because left behind processes keep the
group membership even when the user is no longer logged in on the
machine, allowing background processes to get access to other peoples
hardware.
There is an alternative to group membership for device access, using
file system ACLs, and with systemd this is the recommended default
according to the systemd maintainers. To enable it for a given device,
the 'access' tag can be set.
Please do so for the airspy udev rule, to allow the device to work for
any console user, not only the one created during installation. Here is
a patch:
diff -ur ../pkg-airspy-host/debian/libairspy0.udev debian/libairspy0.udev
--- ../pkg-airspy-host/debian/libairspy0.udev 2016-10-11 06:05:06.752973364
+0000
+++ debian/libairspy0.udev 2016-10-11 06:07:02.000000000 +0000
@@ -1 +1 @@
-ATTR{idVendor}=="1d50", ATTR{idProduct}=="60a1", SYMLINK+="airspy-%k",
MODE="660", GROUP="plugdev"
+ATTR{idVendor}=="1d50", ATTR{idProduct}=="60a1", SYMLINK+="airspy-%k",
MODE="660", GROUP="plugdev", TAG+="uaccess"
diff -ur ../pkg-airspy-host/debian/patches/series debian/patches/series
--- ../pkg-airspy-host/debian/patches/series 2016-10-11 06:05:06.752973364
+0000
+++ debian/patches/series 2016-10-11 06:07:02.510444663 +0000
@@ -1,2 +1,3 @@
0001-On-linux-check-whether-a-kernel-driver-is-attached-t.patch
libusb-freebsd
+udev-console-access.patch
I suspect the plugdev/mode part can be removed, but did not suggest to
do so at this time because I am unsure how it affect non-systemd users.
--
Happy hacking
Petter Reinholdtsen