Bug 438827 - /etc/udev/rules.d/60-libsane.rules is missing
/etc/udev/rules.d/60-libsane.rules is missing
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-25 10:21 EDT by Kevin DeKorte
Modified: 2008-03-27 09:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-27 09:43:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
output of lshal (138.50 KB, text/plain)
2008-03-26 10:08 EDT, Kevin DeKorte
no flags Details
New log after rpms installed (138.71 KB, text/plain)
2008-03-26 17:14 EDT, Kevin DeKorte
no flags Details

  None (edit)
Description Kevin DeKorte 2008-03-25 10:21:13 EDT
Description of problem:
In Fedora 8 the file /etc/udev/rules.d/60-libsane.rules was provided by
sane-backends. Without this file my scanner (Epson Perfection V200) is only
accessible by root

Version-Release number of selected component (if applicable):
sane-backends-1.0.19-8.fc9.i386

How reproducible:
100%

Steps to Reproduce:
1. plugin scanner
2. run xsane
3. 
  
Actual results:
device is not found

Expected results:
device is found

Additional info:

running as root, or copying the /etc/udev/rules.d/60-libsane.rules from a Fedora
8 machine and then restarting allows the scanner to be run as a normal user
Comment 1 Nils Philippsen 2008-03-25 14:29:16 EDT
Rawhide/F9 sane-backends doesn't use udev for setting the permissions on device
files, but HAL policy and ConsoleKit/PolicyKit to set ACLs (which allows e.g.
multiple logged in persons to use devices).

Please identify the device file, check the permissions on it ("getfacl
/dev/..."), tell us the USB vendor and product ID of the device and attach the
output of "lshal" to this report.
Comment 2 Kevin DeKorte 2008-03-26 10:07:51 EDT
device file: /dev/bus/usb/002/002

getfacl /dev/bus/usb/002/002
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/002/002
# owner: root
# group: root
user::rw-
group::r--
other::r--


 usb_device.product = 'EPSON Scanner'  (string)
  usb_device.product_id = 302  (0x12e)  (int)
  usb_device.speed = 480.0 (480) (double)
  usb_device.speed_bcd = 294912  (0x48000)  (int)
  usb_device.vendor = 'Seiko Epson Corp.'  (string)
  usb_device.vendor_id = 1208  (0x4b8)  (int)

Comment 3 Kevin DeKorte 2008-03-26 10:08:18 EDT
Created attachment 299155 [details]
output of lshal
Comment 4 Kevin DeKorte 2008-03-26 10:11:12 EDT
After putting /etc/udev/rules.d/60-libsane.rules back in place

device file: /dev/bus/usb/002/003

 getfacl /dev/bus/usb/002/003 
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/002/003
# owner: kdekorte
# group: root
user::rw-
group::rw-
other::---
Comment 5 Nils Philippsen 2008-03-26 12:05:00 EDT
The new HAL versions use a different key for differentiating subsystems
(info.subsystem vw. info.bus). I've kicked off a build of
sane-backends-1.0.19-9.fc9 which contains the necessary rules for that. Please
test this version (without having /etc/udev/rules.d/60-libsane.rules as a
workaround). Thanks.
Comment 6 Kevin DeKorte 2008-03-26 13:02:09 EDT
I installed the rpms from koji

rpm -qa sane-back\*
sane-backends-libs-1.0.19-9.fc9.i386
sane-backends-devel-1.0.19-9.fc9.i386
sane-backends-1.0.19-9.fc9.i386
sane-backends-libs-gphoto2-1.0.19-9.fc9.i386

removed the .rules file and it still has the wrong permissions, even after a reboot

getfacl /dev/bus/usb/002/002
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/002/002
# owner: root
# group: root
user::rw-
group::r--
other::r--


 info.vendor = 'Seiko Epson Corp.'  (string)
  linux.device_file = '/dev/bus/usb/002/002'  (string)
Comment 7 Kevin DeKorte 2008-03-26 13:27:28 EDT
Just to be even more clear this is how I am testing

[kdekorte@quad ~]$ sudo scanimage -L
[sudo] password for kdekorte: 
device `epkowa:libusb:002:004' is a Epson Perfection V200 flatbed scanner
[kdekorte@quad ~]$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


As you can see, root has access to the scanner, but my normal user id does not.

same goes for xsane.

Comment 8 Nils Philippsen 2008-03-26 16:14:21 EDT
Please attach the output of "lshal". Thanks.
Comment 9 Kevin DeKorte 2008-03-26 17:14:54 EDT
Created attachment 299233 [details]
New log after rpms installed
Comment 10 Kevin DeKorte 2008-03-26 17:15:28 EDT
Log uploaded
Comment 11 Nils Philippsen 2008-03-27 06:38:06 EDT
It seems that the libsane HAL policy is applied too late so the necessary
hal-acl-tool callouts aren't added. I've renamed 60-libsane.fdi to
19-libsane.fdi to change this in sane-backends-1.0.19-10.fc9 which is building
right now. Please check this version once it's available, thanks.
Comment 12 Kevin DeKorte 2008-03-27 09:02:32 EDT
Nils, that fixed it. My scanner now works correctly for a non-root users. 

Thanks!

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