Bug 498228 - [patch] xsane support for Brother MFC-290-C
[patch] xsane support for Brother MFC-290-C
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sane-backends (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Nils Philippsen
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-29 10:29 EDT by Alexander Todorov
Modified: 2012-05-16 09:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 666687 (view as bug list)
Environment:
Last Closed: 2012-05-16 09:20:00 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)
patch for /etc/udev/rules.d/60-libsane.rules (552 bytes, patch)
2009-05-19 04:06 EDT, Alexander Todorov
no flags Details | Diff

  None (edit)
Description Alexander Todorov 2009-04-29 10:29:18 EDT
Description of problem:
Trying to scan images using xsane with a Brother scanner fails when running as non-root user. After accepting the program license an error is shown:

Failed to open device `brother3:bus1;dev1': Error during device I/O.

Version-Release number of selected component (if applicable):
xsane-0.991-5.el5
Brother MFC-290C scanner with brscan3-0.2.5-2 driver

How reproducible:
Always on that particular hardware

Steps to Reproduce:
1. Start xsane as normal user
2. Accept the user licence

  
Actual results:
Error dialog:
Failed to open device `brother3:bus1;dev1': Error during device I/O.

Expected results:
xsane starts and works

Additional info:
Running xsane as root work properly and I'm able to scan images and save the resulting files.

The device is connected via USB and the above error points me to:
$ ls -l /dev/bus/usb/001/001 
crw-r--r-- 1 root root 189, 0 29 апр 16,28 /dev/bus/usb/001/001

This appears to be access permissions issue.

SELinux is in enforcing mode but no denials occur /it should not be SELinux issue/.

brscan3 is a sane backend driver from the manufacturer and it works apparently when running as root.
Comment 1 Alexander Todorov 2009-04-29 10:32:12 EDT
This is preventing regular users to use the scanner locally. They have to execute xsane with root parmissions which is not desirable. 

I can do the testing since I have the device required.
Comment 2 Phil Knirsch 2009-05-12 09:30:26 EDT
Isn't the device created by udev? If so then i think this is rather a udev problem than a xsane problem and we should change the component.

Thanks & regards, Phil
Comment 3 Alexander Todorov 2009-05-12 09:40:28 EDT
(In reply to comment #2)
> Isn't the device created by udev? If so then i think this is rather a udev
> problem than a xsane problem and we should change the component.
> 

I wasn't quite sure which was the correct component. Feel free to change it if you think udev is the correct one.
Comment 4 Phil Knirsch 2009-05-12 11:28:36 EDT
Adding Harald Hoyer (udev maintainer) to the bug so he can comment on it before we possibly switch the component.

Thanks & regards, Phil
Comment 5 Harald Hoyer 2009-05-12 11:48:03 EDT
I think the vendor/device ids are missing in /etc/udev/rules.d/60-libsane.rules 

$ rpm -qf /etc/udev/rules.d/60-libsane.rules 
sane-backends-1.0.18-5.el5

You could quickfix it by duplicating an entry with the correct ids.
Comment 6 Phil Knirsch 2009-05-18 08:33:10 EDT
For that we'd need the details for that scanner though, putting in NEEDINFO

Thanks & regards, Phil
Comment 7 Alexander Todorov 2009-05-18 08:50:14 EDT
What info do you need and where/how to find it? What should be inside /etc/udev/rules.d/60-libsane.rules ?
Comment 8 Phil Knirsch 2009-05-18 11:18:29 EDT
The file /etc/udev/rules.d/60-libsane.rules can be found in the sane-backends package.

The format looks like this:

# Brother FAX-2900
SYSFS{idVendor}=="04f9", SYSFS{idProduct}=="0117", SYMLINK+="scanner-%k"

So we basically need the SYSFS vendor ID and the SYSFS product ID.

I just checked and the Brother MFC-290C doesn't seem to be in there yet.

So i've moved this bug to the sane-backends component as the change needs to go in there.

Thanks & regards, Phil
Comment 9 Alexander Todorov 2009-05-19 04:06:30 EDT
Created attachment 344586 [details]
patch for /etc/udev/rules.d/60-libsane.rules

The above patch works for me. I'm able to start xsane as normal user.
Comment 10 Phil Knirsch 2009-05-19 08:17:46 EDT
Thanks Alexander! Patch looks good, granting Devel ACK.

Regards, Phil
Comment 11 Phil Knirsch 2009-05-21 12:23:09 EDT
Hm. As sane-backends is not an approved component and the deadline for FT erratas for RHEL-5.4 has run out i'll be reflagging it to RHEL-5.5 FT so that we won't forget about it for 5.5.

Thanks & regards, Phil

PS: And yes, imo the change is small and simple enough to make this a viable FT errata.
Comment 20 RHEL Product and Program Management 2012-05-15 15:18:06 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

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