[sane-devel] USB kernel scanner driver

Major A andras@users.sourceforge.net
Wed, 23 Oct 2002 17:47:18 +0100

> The background is, that there isn't a really good reason to have a
> generic driver for USB scanners in the kernel. There is no USB class
> for scanners, so the scanner driver must be constantly updated with
> new vendor and product ids. Furthermore, the scanner driver doesn't
> provide any functionality that can't be accessed through the generic
> /proc/bus/usb interface, i.e. libusb.

How does libusb handle permissions on linux then? /proc/bus/usb can
only be accessed by root. With the USB scanner module, one had a way
of setting permissions via the device file.

How would one restrict access so that although a user can scan, they
can't fiddle with the USB hard drive or CD-ROM or automatic
nuclear-weapon detonator?

saned is great at this, but it would now have as root (I tend to run
it as a dedicated "saned" user), and I don't think we should lay the
burden of setting saned up on the normal user who just wants to scan.

> So the basic question is: Is there anything that the scanner driver
> can do that libusb can't and that's needed by any backend? Are there
> any other reasons to not remove the USB scanner driver in Linux some
> day in the future?

If it happens in linux 2.5.x, then that's fine by me, provided 2.6 or
3.0 is sufficiently far away.

> If there are no objections, the plan will be to change the backends to
> be able to use both libusb and the kernel scanner module.

Isn't that done transparently by the sanei_usb interface?

BTW, VueScan uses the USB scanner module.


Major Andras
    e-mail: andras@users.sourceforge.net
    www:    http://andras.webhop.org/