Bug 104426

Summary: Access to pilot device or any serial/usb devices requires root privileges
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Veerapuram Varadhan <veerapuram.varadhan>
Component: BasesystemAssignee: Ludwig Nussel <lnussel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dkukawka, lnussel
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: output from lshal after pressing HotSync button on a USB Palm m130
udev rules
lshal output after pressing hotsync button in Tungsten T5
lshal output after pressing hotsync button in Handspring Visor (USB cradle)
After adding the user to the uucp group
After adding the user to the uucp group

Description Veerapuram Varadhan 2005-08-12 15:06:28 UTC
When I plug-in a pilot device and try to sync with evolution, it doesn't even
get configured.  The reason being the lack of write-permission on the created
/dev/tty* device nodes.  The user has to either add himself to the uucp group or
use resmgr to get an access to that device.  

The same applies to digital-camera's as well.  Access to these devices shouldn't
need root privileges.
Comment 1 Ludwig Nussel 2005-08-14 15:16:57 UTC
access to serial devices will not be granted by default. There could be   
a modem connected which would open a hole for dialers. 
 
if hal is able to detect that the connected device is not a modem but a  
harmless device we can add it by default to some ressource class. Please  
attach output from lshal with the device connected.  
 
camera access is already fixed. 
Comment 2 Ladislav Michnovic 2005-08-15 09:02:27 UTC
Created attachment 46023 [details]
output from lshal after pressing HotSync button on a USB Palm m130

The /dev/ttyUSB0 exists only after pressing HotSync button, not after pluging
the Palm into the USB. After HotSync /dev/ttyUSB0 dissapears from /dev again.
Comment 3 Ludwig Nussel 2005-08-15 09:35:13 UTC
The device actually provides two serial ports. ttyUSB1 has additional 
properties that indicate it's a pda. ttyUSB0 looks like a regular serial port. 
So with the current information it's not possible to have a generic match rule 
that could distinguish pda and modem. 
Comment 4 Ludwig Nussel 2005-08-15 09:46:06 UTC
Hmm, those pda properties come 
from /usr/share/hal/fdi/information/10freedesktop/10-usb-pda.fdi 
 
They explicitely match for the second serial port and don't add the properties 
to the first. 
Comment 5 Ludwig Nussel 2005-08-17 08:10:24 UTC
I'll add a pda class to resmgr and include it in class desktop. Then all 
that's needed to support pda access is proper detection from hal, reassigning 
to hal maintainer. 
Comment 6 Veerapuram Varadhan 2005-08-17 15:13:28 UTC
Yes, on pressing HotSync button, two ports will be created, and the second port
will have the properties of a pda.
Comment 7 Danny Al-Gaaf 2005-08-17 15:25:41 UTC
Ludwig: is it enough to set  pda.platform = 'palm' for both ports and you match 
in hal-resmgr for this key, or is it also need to add  pda.platform = 'palm' (or 
something else) to the usb-device?
Comment 8 Danny Al-Gaaf 2005-08-17 16:14:39 UTC
reassign to lnussel: as disccussed, check if there are any security problems. If 
not I change the fdi file for the second serial port, but if there are any 
objection we must use maybe suseplugger for this.
Comment 9 Ludwig Nussel 2005-08-19 14:17:50 UTC
Seems there are too many different devices to be able to determine the correct 
serial port. Let's hope the visor driver only matches actually only pda and 
not some mobile+pda combo devices. I'll add all devices that have pda.platform 
set into the resmgr class pda now. Danny will fix the hal fdi file for pdas so 
both serial ports get that property. 
Comment 10 Danny Al-Gaaf 2005-08-20 18:10:58 UTC
fixed in the HAL fdi file and pushed upstream. Reassign back to ludwig.
Comment 11 Danny Al-Gaaf 2005-08-21 16:19:49 UTC
Veerapuram: can you tell me which of the both serial ports is the really hotsync 
interface? ttyUSB0 or ttyUSB1. I would like to add this special case correct to 
the HAL fdi file.
Comment 12 Ladislav Michnovic 2005-08-22 08:39:40 UTC
In my case pilot-xfer was able to communicate with ttyUSB0, not with ttyUSB1.
USB Palm m130. I'll wonder if other models are using different tty, but I'm not
sure.
Veerapuram: Is it same in your case?
Comment 13 Danny Al-Gaaf 2005-08-22 10:21:25 UTC
@Ladislav: can you please attach a output of lshal to the bug?
Comment 14 Ladislav Michnovic 2005-08-22 10:31:46 UTC
Already attached in comment #2.
Comment 15 Veerapuram Varadhan 2005-08-22 10:57:27 UTC
Created attachment 46872 [details]
udev rules
Comment 16 Veerapuram Varadhan 2005-08-22 10:59:43 UTC
Comment on attachment 46872 [details]
udev rules

Ah!! sorry was on leave.
@Ladislav, @Danny: In my case, it is the second port (i.e,) ttyUSB1. I have
Handspring Visor and Tungsten T5.

Also, I have written a udev rules file for creating a link when such devices
are attached.  Don't know whether that would help you in anyway, however
attaching it here.  Also, I modified the /etc/group file and added the
corresponding user to the uucp group for write access. Will attach lshal output
shortly.
Comment 17 Danny Al-Gaaf 2005-08-22 11:14:53 UTC
@Ladislav: overlooked the attachment ;)
@Veerapuram: please attach the output of lshal for each of the both devices. Is 
it ttyUSB1 in both cases?
Comment 18 Veerapuram Varadhan 2005-08-22 11:20:25 UTC
Created attachment 46878 [details]
lshal output after pressing hotsync button in Tungsten T5 

Attaching the log of lshal command after during hotsync operation with Tungsten
T5 palm device.
Comment 19 Veerapuram Varadhan 2005-08-22 11:23:13 UTC
Created attachment 46882 [details]
lshal output after pressing hotsync button in Handspring Visor (USB cradle)

Attaching the output of lshal during the hotsync operation with Handspring
Visor device (USB cradle).
Comment 20 Veerapuram Varadhan 2005-08-22 11:32:36 UTC
@Danny: Yes, it is ttyUSB1 (or the second port, in general) for the devices that
I have here.
Comment 21 Ludwig Nussel 2005-08-22 13:44:26 UTC
a new hal-resmgr which adds pdas to resmgr is checked in 
Comment 22 Danny Al-Gaaf 2005-08-24 07:05:25 UTC
@Veerapuram: Looks like the visor kernel module isn't loaded for the Tungsten T5 
and the Visor. Or is it? If not: is there a special reason? The devices should 
be handled by this module (vendorID and product ID match for this).

Can you please load the module and attach a new version for lshal?

Comment 23 Danny Al-Gaaf 2005-08-24 07:16:29 UTC
@Veerapuram: is the output of lshal from a SUSE 9.3 ? Looks like a machine with 
a old kernel and like the output of a hal version<=0.4.x
Comment 24 Veerapuram Varadhan 2005-08-24 07:42:20 UTC
@Danny: <for #22>: The visor module was loaded, however, the device wasn't
syncing because of disabling those udev rules.  Attaching the new logs after
modifying the /etc/group to let the user have proper rights on the usb port.

for #23: Yes, I am using SuSE 9.3 :)
Comment 25 Veerapuram Varadhan 2005-08-24 07:44:15 UTC
Created attachment 47305 [details]
After adding the user to the uucp group
Comment 26 Veerapuram Varadhan 2005-08-24 07:45:21 UTC
Created attachment 47306 [details]
After adding the user to the uucp group
Comment 27 Danny Al-Gaaf 2005-08-24 08:10:09 UTC
o.k. I added the devices for 10.0 to HAL to detect them as pda. Thanks.
Comment 28 Veerapuram Varadhan 2005-08-24 08:26:17 UTC
No probs.  If you want logs generated in a 10.0, can get you that as well. :)
Comment 29 Danny Al-Gaaf 2005-08-24 08:45:51 UTC
You could me send them from the upcommit Beta 4 next week to verify if the 
changes work (send them pleas directly).
Comment 30 Veerapuram Varadhan 2005-08-24 09:00:40 UTC
Sure, the moment I get Beta 4 here, will mail you the logs.  Thanks.