[u]Background[/u]
We are trying to get a USB driver for a security device to work on the sunray.  
We are working directly with the device manufacturer, however currently we are 
both stumped.  

[u]Problem[/u]
If the calling application (the one calling the driver) is a 'setuid-root' 
application the driver fails in usb_set_configuration(device, 1).  

The driver is a user-mode driver that uses libusb.  All tests pass on 
non-sunray Solaris, but some fail on the sunray.

[u]Here is the test matrix for Sunray[/u]:
[b]uid[/b]=root, [b]euid[/b]=root -> pass
[b]uid[/b]=<normal user> [b]euid[/b]=<normal user> -> pass
[b]uid[/b]=<normal user> [b]euid[/b]=root -> fail

[u]How we are configuring the device[/u]
We found (from non-sunray testing) that we needed to set the ugen permissions 
for the device using the following commands in order for a normal (non root) 
user to access the device.  We got this off of the solaris I/O website.

rem_drv ugen
add_drv -i '"usb1234,567"' -m '* 0666 root other' ugen

Note: Strangely this step not necessary on Sunray in order for a normal user to 
access the device.

I must admit, I don't fully understand the rem_drv ugen command, it seems that 
command would affect all devices which use ugen (and therefore all libusb based 
drivers).  Fortunately its the only ugen device on our test box, though in a 
production scenario I am unclear of the implications.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-help mailing list
[email protected]

Reply via email to