Closed hnez closed 3 years ago
The discovery of USB device descriptor contents by traversing upwards in /sys/devices
was deemed not stable enough.
An alternative would be the usage of pyudev
to do the discovery. But we decided that the list
feature is not worth the additional dependency.
Closing this for now.
The usbsdmux command and usbsdmux-service do not validate the supplied device path. This is not ideal, especially for the service, as it allows normal users to send a sequence of weird ioctl to any device they want.
This commit adds checks for the device path and USB descriptor values while still allowing the user to override these checks. This fixes #26.