Karl O. Pinc a écrit : > Hello, > > lsusb silently ignores at least some permission errors, resulting in > no output for the device to which there are no permissions. I have it > on the authority of the Debian lsusb maintainter that this cannot be > fixed in the application. Therefore there is a problem in the kernel > or the USB code that needs fixing so I'm reporting it here. Please let > me know if I should report somewhere else. > > Something somewhere is silently ignoring permission violations and the > result is that lsusb must always be run as root or the results cannot > be trusted because there is no way to know when all devices are shown > and when not. (In an SELinux environment the problem may well be > worse and lsusb can _never_ be trusted.) Of course lsusb should not > show details about devices to which the user has no permissions, but > it should show a permission violation. Silently ignoring permission > errors and pretending these these devices do not exist is not > unix-like. lsusb is violating the principal of least suprise. > > If lsusb can detect that a device exists, and it should because the > device is visible in the /dev hierarchy, it should be able to tell > that it can't get any information about the device and issue an error, > just like cat does when it tries to read a file without permission or > ls does when it tries to read a directory or follow a symlink and > there's no permission.
As already explained, lsusb does not parse /dev, but uses libusb for that. If a device is not in the list given by libusb, lsusb has no way to guess that a device is missing. Aurelien -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

