Re: [PATCH 1/5] lsusb: install into /usr/bin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 26, 2010 at 8:23 PM, Samuli Suominen wrote:
> On 10/27/2010 03:05 AM, Sarah Sharp wrote:
>> On Mon, Oct 25, 2010 at 03:09:21AM -0400, Mike Frysinger wrote:
>>> This program may easily run as non-root, so no need to keep it in sbin.
>>
>> On Debian (and Ubuntu) I've always gotten errors with descriptor
>> fetching if I try to run lsusb as a non-root user.  For example:
>>
>> sarah@xanatos:~$ lsusb -v -d 1d6b:0001
>>
>> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>> Device Descriptor:
>>   bLength                18
>>   bDescriptorType         1
>>   bcdUSB               1.10
>>   bDeviceClass            9 Hub
>>   bDeviceSubClass         0 Unused
>>   bDeviceProtocol         0 Full speed (or root) hub
>>   bMaxPacketSize0        64
>>   idVendor           0x1d6b Linux Foundation
>>   idProduct          0x0001 1.1 root hub
>>   bcdDevice            2.06
>>   iManufacturer           3
>>   iProduct                2
>>   iSerial                 1
>>   bNumConfigurations      1
>>   Configuration Descriptor:
>>     bLength                 9
>>     bDescriptorType         2
>>     wTotalLength           25
>>     bNumInterfaces          1
>>     bConfigurationValue     1
>>     iConfiguration          0
>>     bmAttributes         0xe0
>>       Self Powered
>>       Remote Wakeup
>>     MaxPower                0mA
>>     Interface Descriptor:
>>       bLength                 9
>>       bDescriptorType         4
>>       bInterfaceNumber        0
>>       bAlternateSetting       0
>>       bNumEndpoints           1
>>       bInterfaceClass         9 Hub
>>       bInterfaceSubClass      0 Unused
>>       bInterfaceProtocol      0 Full speed (or root) hub
>>       iInterface              0
>>       Endpoint Descriptor:
>>         bLength                 7
>>         bDescriptorType         5
>>         bEndpointAddress     0x81  EP 1 IN
>>         bmAttributes            3
>>           Transfer Type            Interrupt
>>           Synch Type               None
>>           Usage Type               Data
>>         wMaxPacketSize     0x0002  1x 2 bytes
>>         bInterval             255
>> can't get hub descriptor: Operation not permitted
>> cannot read device status, Operation not permitted (1)
>>
>> The descriptors are fetched fine when I run lsusb as root.  This is probably
>> due to file permissions, but do you really want to move lsusb out of sbin?
>
> lsusb's output is useful as-is without parameters to find the correct
> drivers based on device id when you build the kernel.
> it would be best to simply provide less output when ran as root.
>
> but what really stemmed this issue is:
>
> $ usbmodules
> /usr/bin/usbmodules: line 53: lsusb: command not found
>
> usbmodules gets installed into /usr/bin and lsusb to /usr/sbin, and
> programs from bin can't rely on programs from sbin unless full path is
> provided.

FYI this is a script i wrote and upstream never got around to merging,
so it's only in Gentoo

but i dont think the inability to read a few pieces of info as
non-root on some systems should prevent moving to /usr/bin.  there is
plenty of info that is accessible to non-root users.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux