Bug 466604 - regression: hal no longer grants access to "PDA" usb devices
regression: hal no longer grants access to "PDA" usb devices
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
: Reopened
: 467623 (view as bug list)
Depends On:
Blocks: F10Blocker/F10FinalBlocker F10DesktopBlocker
  Show dependency treegraph
 
Reported: 2008-10-11 01:13 EDT by James Ralston
Modified: 2009-11-22 10:29 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-22 10:29:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Ralston 2008-10-11 01:13:05 EDT
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 10:57:05 EDT
Ivana, where are those fdi files for pilot-link hidden in hal?

* Wed Mar 26 2008 Ivana Varekova <varekova@redhat.com> 2:0.12.3-13
- remove HAL/PolicyKit staff (is in hal package now)
Comment 2 James Ralston 2008-10-20 14:00:02 EDT
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 06:41:02 EDT
(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 09:31:59 EDT
*** Bug 467623 has been marked as a duplicate of this bug. ***
Comment 5 Kevin R. Page 2008-10-21 09:44:01 EDT
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 15:32:55 EDT
(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 13:17:09 EDT
I've just built hal-0.5.12-7.20081022git.fc10 for rawhide if that helps.
Comment 8 James Ralston 2008-10-22 19:59:02 EDT
I'll test hal-0.5.12-7.20081022git.fc10 and report back.
Comment 9 Matthias Clasen 2008-10-24 11:58:27 EDT
James, any update ?
Comment 10 James Ralston 2008-10-24 18:15:03 EDT
hal-0.5.12-7.20081022git fixes it.

Closing with RAWHIDE...
Comment 11 Patrick C. F. Ernzer 2009-11-21 23:35:11 EST
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 05:41:05 EST
(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 10:29:28 EST
(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.