Bug 466604 - regression: hal no longer grants access to "PDA" usb devices
Summary: regression: hal no longer grants access to "PDA" usb devices
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 467623 (view as bug list)
Depends On:
Blocks: F10Blocker, F10FinalBlocker F10DesktopBlocker
TreeView+ depends on / blocked
 
Reported: 2008-10-11 05:13 UTC by James Ralston
Modified: 2009-11-22 15:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-22 15:29:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Ralston 2008-10-11 05:13:05 UTC
USB device files created in /dev/bus/usb for syncing Palm PDA devices must grant read/write access for the user executing the sync operation.

/usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi has logic to identify Palm PDAs and grant access.  This has been working properly since at least F9, if not F8.

However, recent rawhide versions of hal have regressed, in that they no longer grant access to the Palm USB devices:

[Press the HotSync button]

$ strace pilot-xfer -l -p usb:
[...]
open("/dev/bus/usb/002/003", O_RDWR)    = -1 EACCES (Permission denied)
open("/dev/bus/usb/002/003", O_RDONLY)  = 4
ioctl(4, USBDEVFS_IOCTL, 0x7fff12fd6170) = -1 EPERM (Operation not permitted)
close(4)                                = 0
open("/dev/bus/usb/002/002", O_RDWR)    = -1 EACCES (Permission denied)
open("/dev/bus/usb/002/002", O_RDONLY)  = 4
ioctl(4, USBDEVFS_IOCTL, 0x7fff12fd6170) = -1 EPERM (Operation not permitted)
close(4)                                = 0
open("/dev/bus/usb/002/001", O_RDWR)    = -1 EACCES (Permission denied)
open("/dev/bus/usb/002/001", O_RDONLY)  = 4
ioctl(4, USBDEVFS_IOCTL, 0x7fff12fd6170) = -1 EPERM (Operation not permitted)
[...]

In the above example, opening a root shell and manually chown'ing the device in question to the person running pilot-xfer will cause the sync to proceed.

I'm not quite sure when the regression occurred, but the version of hal that shipped with F10 alpha was ok, and the current rawhide version (hal-0.5.12-2.20081001git) has the regression.

Comment 1 Bastien Nocera 2008-10-20 14:57:05 UTC
Ivana, where are those fdi files for pilot-link hidden in hal?

* Wed Mar 26 2008 Ivana Varekova <varekova> 2:0.12.3-13
- remove HAL/PolicyKit staff (is in hal package now)

Comment 2 James Ralston 2008-10-20 18:00:02 UTC
Bastien, is this what you're looking for?

/usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi

Comment 3 Kevin R. Page 2008-10-21 10:41:02 UTC
(In reply to comment #2)
> Bastien, is this what you're looking for?
> /usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi

Yeah, should be:
pda.platform, pda.palm.hotsync_interface, and info.capabilities{pda} set from:
/usr/share/hal/fdi/information/10freedesktop/10-usb-pda.fdi

and these in turn matched and access set in:
/usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi

Looking at debug from bug #467623 access_control.type is set, but access_control.file isn't.

Comment 4 Alex Lancaster 2008-10-21 13:31:59 UTC
*** Bug 467623 has been marked as a duplicate of this bug. ***

Comment 5 Kevin R. Page 2008-10-21 13:44:01 UTC
I strongly suspect the access_control.file in second pda.platform stanza (added with "FIXME: check if redundant with above "PalmOS PDAs" section"!) is matching and overwriting your device path with a crap value (20-acl-management.fdi, line 199).

Looks like there's a fix upstream:
http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=6c7a7aeea3aef5828d3f011107003371588292fa

N.B. Not tested - I'm don't have a rawhide box - so I'm only as sure as eyeballing Fedora CVS.

Comment 6 Patrick C. F. Ernzer 2008-10-21 19:32:55 UTC
(In reply to comment #5)
> Looks like there's a fix upstream:
> http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=6c7a7aeea3aef5828d3f011107003371588292fa

confirm that the above solves the problem (Bug 467623) for me.

can we push this to rawhide please?

Comment 7 Richard Hughes 2008-10-22 17:17:09 UTC
I've just built hal-0.5.12-7.20081022git.fc10 for rawhide if that helps.

Comment 8 James Ralston 2008-10-22 23:59:02 UTC
I'll test hal-0.5.12-7.20081022git.fc10 and report back.

Comment 9 Matthias Clasen 2008-10-24 15:58:27 UTC
James, any update ?

Comment 10 James Ralston 2008-10-24 22:15:03 UTC
hal-0.5.12-7.20081022git fixes it.

Closing with RAWHIDE...

Comment 11 Patrick C. F. Ernzer 2009-11-22 04:35:11 UTC
Bug as per original description seems to be back in F12 (EPERM on strace and fixed via chmod) on a fresh install

Comment 12 Alex Lancaster 2009-11-22 10:41:05 UTC
(In reply to comment #11)
> Bug as per original description seems to be back in F12 (EPERM on strace and
> fixed via chmod) on a fresh install  

hal doesn't handle Palm devices at all now, it's been delegated back to udev, see bug #529259

Comment 13 Patrick C. F. Ernzer 2009-11-22 15:29:28 UTC
(In reply to comment #12)
Ah OK, closing again then


Note You need to log in before you can comment on or make changes to this bug.