Re: lsusb omits some devices and (apparently) cannot be fixed

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, Sep 14, 2007 at 12:17:17AM +0200, Aurelien Jarno wrote:
> 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.

libusb uses /dev on "modern" versions of Linux :)

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.